System.CodeDom.CodeDirectiveCollection.Add C# (CSharp) Method

Add() public method

public Add ( System.CodeDom.CodeDirective value ) : int
value System.CodeDom.CodeDirective
return int
        public int Add(CodeDirective value) {
            return List.Add(value);
        }
        

Usage Example

		public void Constructor1_Deny_Unrestricted ()
		{
			CodeDirectiveCollection coll = new CodeDirectiveCollection (array);
			coll.CopyTo (array, 0);
			Assert.AreEqual (1, coll.Add (cd), "Add");
			Assert.AreSame (cd, coll[0], "this[int]");
			coll.AddRange (array);
			coll.AddRange (coll);
			Assert.IsTrue (coll.Contains (cd), "Contains");
			Assert.AreEqual (0, coll.IndexOf (cd), "IndexOf");
			coll.Insert (0, cd);
			coll.Remove (cd);
		}
All Usage Examples Of System.CodeDom.CodeDirectiveCollection::Add