fork download
  1. using System;
  2.  
  3. namespace Enum
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. string[] x = { "A", "B", "C", "D", "E", "F", "G" };
  10. string[] y = new string[4];
  11. Array.Copy(x, y, 4);
  12. foreach (var item in y)
  13. {
  14. Console.WriteLine(item);
  15. }
  16. }
  17. }
  18. }
Success #stdin #stdout 0.03s 33792KB
stdin
Standard input is empty
stdout
A
B
C
D