- using System;
- using System.Collections.Generic;
- namespace forgetCode
- {
- class program
- {
- public static void Main()
- {
- int[] array = new int[3]; // New array with 3 elements
- array[0] = 10;
- array[1] = 20;
- array[2] = 30;
- List<int> list = new List<int>(array); // Copy to List
- Console.WriteLine(list.Count);
- }
- }
- }