public Insert ( int index, |
||
index | int | |
value | ||
Résultat | void |
public void Constructor0_Deny_Unrestricted () { CodeAttributeDeclarationCollection coll = new CodeAttributeDeclarationCollection (); Assert.AreEqual (0, coll.Add (cad), "Add"); Assert.AreSame (cad, coll[0], "this[int]"); coll.CopyTo (array, 0); coll.AddRange (array); coll.AddRange (coll); Assert.IsTrue (coll.Contains (cad), "Contains"); Assert.AreEqual (0, coll.IndexOf (cad), "IndexOf"); coll.Insert (0, cad); coll.Remove (cad); }
public void Insert_Null () { CodeAttributeDeclarationCollection coll = new CodeAttributeDeclarationCollection (); coll.Insert (0, (CodeAttributeDeclaration) null); }
public void Insert () { CodeAttributeDeclaration cad1 = new CodeAttributeDeclaration (); CodeAttributeDeclaration cad2 = new CodeAttributeDeclaration (); CodeAttributeDeclarationCollection coll = new CodeAttributeDeclarationCollection (); coll.Add (cad1); Assert.AreEqual (1, coll.Count, "#1"); Assert.AreEqual (0, coll.IndexOf (cad1), "#2"); coll.Insert (0, cad2); Assert.AreEqual (2, coll.Count, "#3"); Assert.AreEqual (1, coll.IndexOf (cad1), "#4"); Assert.AreEqual (0, coll.IndexOf (cad2), "#5"); }