fork(22) download
  1. using System;
  2. using System.Linq;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. int[][] a = new int[10][];
  9. for (int i = 0 ; i != 10 ; i++) {
  10. a[i] = new int[20];
  11. a[i][0] = i+100;
  12. }
  13. var copy = a.Select(x => x.ToArray()).ToArray();
  14. a[0][0] = 1234;
  15. Console.WriteLine(a[0][0]);
  16. Console.WriteLine(copy[0][0]);
  17. }
  18. }
Success #stdin #stdout 0.04s 34032KB
stdin
Standard input is empty
stdout
1234
100