fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. delegate void MyFunType(ref int x);
  6. public static void Main()
  7. {
  8. MyFunType fun = delegate(ref int x) {
  9. x = 1;
  10. };
  11. int y = 42;
  12. fun(ref y);
  13. Console.WriteLine(y);
  14. }
  15. }
Success #stdin #stdout 0.03s 33888KB
stdin
Standard input is empty
stdout
1