System.CodeDom.CodeNamespaceCollection.AddRange C# (CSharp) Méthode

AddRange() public méthode

public AddRange ( CodeNamespaceCollection value ) : void
value CodeNamespaceCollection
Résultat void
        public void AddRange(CodeNamespaceCollection value) {
            if (value == null) {
                throw new ArgumentNullException("value");
            }
            int currentCount = value.Count;
            for (int i = 0; i < currentCount; i = ((i) + (1))) {
                this.Add(value[i]);
            }
        }
        

Same methods

CodeNamespaceCollection::AddRange ( CodeNamespace value ) : void

Usage Example

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