public Insert ( int index, |
||
index | int | |
value | ||
Результат | void |
public void Constructor0_Deny_Unrestricted () { CodeTypeMemberCollection coll = new CodeTypeMemberCollection (); Assert.AreEqual (0, coll.Add (ctm), "Add"); Assert.AreSame (ctm, coll[0], "this[int]"); coll.CopyTo (array, 0); coll.AddRange (array); coll.AddRange (coll); Assert.IsTrue (coll.Contains (ctm), "Contains"); Assert.AreEqual (0, coll.IndexOf (ctm), "IndexOf"); coll.Insert (0, ctm); coll.Remove (ctm); }
public void Insert_Null () { CodeTypeMemberCollection coll = new CodeTypeMemberCollection (); coll.Insert (0, (CodeTypeMember) null); }
public void Insert () { CodeTypeMember tm1 = new CodeTypeMember (); CodeTypeMember tm2 = new CodeTypeMember (); CodeTypeMemberCollection coll = new CodeTypeMemberCollection (); coll.Add (tm1); Assert.AreEqual (1, coll.Count, "#1"); Assert.AreEqual (0, coll.IndexOf (tm1), "#2"); coll.Insert (0, tm2); Assert.AreEqual (2, coll.Count, "#3"); Assert.AreEqual (1, coll.IndexOf (tm1), "#4"); Assert.AreEqual (0, coll.IndexOf (tm2), "#5"); }