using System.Collections.Generic;
public static void Main()
A[] array = ConvertArray<A>();
Console.WriteLine(array.Length);
public static T[] ConvertArray<T>() where T : X
List<A> lst = new List<A>();
A[] inputArray = lst.ToArray();
return inputArray as T[];