Advertisement
Guest User

Untitled

a guest
Jan 29th, 2020
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.00 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApplication5
  4. {
  5.     class Program : ICloneable
  6.     {
  7.         private ICloneable _cloneableImplementation;
  8.  
  9.         public static void Main(string[] args)
  10.         {
  11.             {
  12.                 int[][] a = new int[][]
  13.                 {
  14.                     new int[] {0, 0},
  15.                     new int[] {1, 2},
  16.                     new int[] {2, 4},
  17.                     new int[] {3, 6}
  18.                 };
  19.                 // Wypisanie wszystkich elementów w konsoli
  20.                 for (int i = 0; i < 4; i++)
  21.                 {
  22.                     for (int j = 0; j < 2; j++)
  23.                     {
  24.                         Console.WriteLine("a[{0}, {1}] = {2}", i, j, a[i][j]);
  25.                     }
  26.                 }
  27.  
  28.  
  29.                 object Clone()
  30.                 {
  31.                     return a;
  32.                 }
  33.             }
  34.         }
  35.  
  36.         public object Clone()
  37.         {
  38.             return _cloneableImplementation.Clone();
  39.         }
  40.     }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement