public static int Main_old() { Other_TestClass_covariance_implicit_01_Imp[] mc = new Other_TestClass_covariance_implicit_01_Imp[10]; for (int x = 0; x < 10; x++) { mc[x] = new Other_TestClass_covariance_implicit_01_Imp(); Log.Comment(x.ToString()); mc[x].x = x; } object[] o = new object[10]; o = mc; for (int x = 0; x < 10; x++) { Log.Comment(((Other_TestClass_covariance_implicit_01_Imp)o[x]).x.ToString()); } return(0); }
public static int Main_old() { Other_TestClass_covariance_implicit_01_Imp[] mc = new Other_TestClass_covariance_implicit_01_Imp[10]; for (int x = 0; x < 10; x++) { mc[x] = new Other_TestClass_covariance_implicit_01_Imp(); Log.Comment(x.ToString()); mc[x].x = x; } object[] o = new object[10]; o = mc; for (int x = 0; x < 10; x++) { Log.Comment(((Other_TestClass_covariance_implicit_01_Imp)o[x]).x.ToString()); } return 0; }