public Remove ( System.CodeDom.CodeExpression value ) : void | ||
value | System.CodeDom.CodeExpression | |
Результат | void |
public void Constructor0_Deny_Unrestricted () { CodeExpressionCollection coll = new CodeExpressionCollection (); Assert.AreEqual (0, coll.Add (ce), "Add"); Assert.AreSame (ce, coll[0], "this[int]"); coll.CopyTo (array, 0); coll.AddRange (array); coll.AddRange (coll); Assert.IsTrue (coll.Contains (ce), "Contains"); Assert.AreEqual (0, coll.IndexOf (ce), "IndexOf"); coll.Insert (0, ce); coll.Remove (ce); }
public void Remove_NotInCollection () { CodeExpressionCollection coll = new CodeExpressionCollection (); coll.Remove (new CodeExpression ()); }
public void Remove_Null () { CodeExpressionCollection coll = new CodeExpressionCollection (); coll.Remove ((CodeExpression) null); }
public void Remove () { CodeExpression ce1 = new CodeExpression (); CodeExpression ce2 = new CodeExpression (); CodeExpressionCollection coll = new CodeExpressionCollection (); coll.Add (ce1); coll.Add (ce2); Assert.AreEqual (2, coll.Count, "#1"); Assert.AreEqual (0, coll.IndexOf (ce1), "#2"); Assert.AreEqual (1, coll.IndexOf (ce2), "#3"); coll.Remove (ce1); Assert.AreEqual (1, coll.Count, "#4"); Assert.AreEqual (-1, coll.IndexOf (ce1), "#5"); Assert.AreEqual (0, coll.IndexOf (ce2), "#6"); }