I wonder if there\'s any way something like this would be possible for value types...
public static class ExtensionMethods {
public static void SetTo(thi
Here is some interesting solution:
public delegate RecursionRefFunc RecursionRefFunc(ref T arg);
public static RecursionRefFunc Boo(ref T input)
{
Console.WriteLine(input); // Work in here
return Boo;
}
public static void Main(string[] args)
{
int x1 = 1, x2 = 2, x3 = 3, x4 = 4, x5 = 5;
Boo(ref x1)(ref x2)(ref x3)(ref x4)(ref x5);
}
// Output: //
// 1
// 2
// 3
// 4
// 5
Delegate can declare in recursion.
Return a function outside and call again.
And you will be killed by the code reviewer.
Advertisement OW<: CWKSC/MyLib_Csharp