public static int[] runit( ) { int[] intarray = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; //instantiate generic with Integer CollectionTestClass <int> intObj = new CollectionTestClass <int> ( ); //adding integer values into collection intObj.Add(1); intObj.Add(2); intObj.Add(3); //No boxing intObj.Add(4); intObj.Add(5); intObj.Add(6); intObj.Add(7); intObj.Add(8); intObj.Add(9); intObj.Add(10); //displaying values for (int i = 0; i < intObj.count; i++) { intarray[i] = intObj[i]; } return(intarray); }
public void WriteCollectionTestClassContainingNulls() { string xml = NetReflector.Write(CollectionTestClass.CreateCollectionContainingNulls()); Assert.AreEqual(CollectionTestClass.GetXmlWithMissingNullElements(), xml); }
public void ReadCollectionTestClass() { CollectionTestClass actual = (CollectionTestClass)NetReflector.Read(CollectionTestClass.GetXml(), table); CollectionTestClass.AssertEquals(CollectionTestClass.Create(), actual); }
public void WriteCollectionTestClass() { string xml = NetReflector.Write(CollectionTestClass.Create()); Assert.AreEqual(CollectionTestClass.GetXml(), xml); }