using System;
using System.Collections.Generic;
public class Program
{
public static void Main(string[] args)
int[] array = { 1, 2, 3, 4, 5 };
List<int> list = new List<int>();
int i = 0;
while (i < array.Length)
int value = array[i];
list.Add(value);
i++;
}
Console.WriteLine("Values inserted into the list:");
foreach (int value in list)
Console.WriteLine(value);