+ 1
This is from the section of passing values by output. In this question, can anyone explain how console line is executed??
static void GetValues(out int x, out int y){ x = 5; y = 42; }static void Main(strings[] args) {int a, int b; GetValues(out a, out b); Console. WriteLine(a+" "+b) ;}
3 Answers
+ 1
Can you clarify this a bit more? I'll try to maybe answer your question. It would print out 5 42 because a and b take on the values of x and y in the GetValues method. So, it prints out 5 space 42. Does this help?
+ 1
Console.WriteLine is what writes and displays text to the console window. It also includes a carriage return or new line delimiter. Console.Write on the other hand doesn't include a carriage return.
0
I want to ask that what is the meaning of console. Writeline... Statement in this code?