I have read that .NET supports return of references, but C# doesn't. Is there a special reason? Why I can't do something like:
static ref int Max(ref int x, ref int y)
{
if (x > y)
return ref x;
else
return ref y;
}
I have read that .NET supports return of references, but C# doesn't. Is there a special reason? Why I can't do something like:
static ref int Max(ref int x, ref int y)
{
if (x > y)
return ref x;
else
return ref y;
}