C
Chris
Hi,
This what the documentation says about out-parameters
The value of an out argument will not be passed to the out parameter.
But ...
static void F(out int i)
{
i = 9; ==> set breakpoint here
Console.WriteLine(i);
}
static void Main()
{
int i = 10;
F(out i);
}
I set a breakpoint in F() and see that 'i' has a value of 10 before it is
being assigned the value 9. Agree, you can't really use the value of 10 but
apparently the value is sent over the wire if F() would be implemented on a
server somewhere.
Is the doc wrong or what is happening here ?
thnx
Chris
This what the documentation says about out-parameters
The value of an out argument will not be passed to the out parameter.
But ...
static void F(out int i)
{
i = 9; ==> set breakpoint here
Console.WriteLine(i);
}
static void Main()
{
int i = 10;
F(out i);
}
I set a breakpoint in F() and see that 'i' has a value of 10 before it is
being assigned the value 9. Agree, you can't really use the value of 10 but
apparently the value is sent over the wire if F() would be implemented on a
server somewhere.
Is the doc wrong or what is happening here ?
thnx
Chris