Cc clone the entire array

From , 5 Years ago, written in C#, viewed 218 times.
URL https://pastebin.vip/view/90b9ec1e
  1. using System;
  2.  
  3. class CloneArray
  4. {
  5.    public static void Main()
  6.    {
  7.       string[] array1 = {"a", "b", "c"};
  8.       string[] array2 = (string[]) array1.Clone();
  9.       DumpArray ("Original array: ", array1);
  10.       DumpArray ("Cloned   array: ", array2);
  11.    }
  12.    
  13.    private static void DumpArray (string title, string[] array)
  14.    {
  15.       Console.Write (title);
  16.       foreach (string s in array)
  17.       {
  18.          Console.Write ("{0} ", s);
  19.       }
  20.       Console.WriteLine();
  21.    }
  22. }
  23.  
  24.  
  25.  
  26. //csharp/4147

Reply to "Cc clone the entire array"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website