public static List <Item> makeData(int n) { List <Item> ret = new List <Item>(n); using (ILScope.Enter()) { ILArray <double> A = rand(1, n); double[] values = A.GetArrayForRead(); for (int i = 0; i < n; i++) { ret.Add(new Item() { Value = values[i] }); } } return(ret); }