public static Trade[] GenerateData(IRIS irisNative, int objectCount) { Trade[] data = new Trade[objectCount]; try{ for (int i = 0; i < objectCount; i++) { DateTime tempDate = Convert.ToDateTime("2018-01-01"); double tempAmount = (double)irisNative.ClassMethodDouble("%PopulateUtils", "Currency"); String tempName = irisNative.ClassMethodString("%PopulateUtils", "String") + irisNative.ClassMethodString("%PopulateUtils", "String") + irisNative.ClassMethodString("%PopulateUtils", "String"); String tempTrader = irisNative.ClassMethodString("%PopulateUtils", "Name"); int tempShares = new Random().Next(1, 20); data[i] = new Trade(tempName, tempDate, tempAmount, tempShares, tempTrader); Console.WriteLine("New trade: " + tempName + " , " + tempDate + " , " + tempAmount + " , " + tempShares + " , " + tempTrader); } } catch (Exception e) { Console.WriteLine(e); } return(data); }