.NET Framework · Puzzle
C# Puzzle: out parameters
This method usually outputs false.
Can you imagine a situation where it outputs true?
[code lang=”csharp” light=”true”]
static bool Test(out int x, out int y)
{
x = 123;
y = 45;
return (x == y);
}
[/code]
You can find the solution in .NET Fiddle.