public DelegateDeclaration AddDelegate(string name)
        {
            if (name==null)
                throw new ArgumentNullException("name");

            DelegateDeclaration d = new DelegateDeclaration(name,this);
            this.delegates.Add(d);
            return d;
        }
 /// <summary>
 /// Removes the first occurrence of a specific DelegateDeclaration from this DelegateDeclarationCollection.
 /// </summary>
 /// <param name="value">
 /// The DelegateDeclaration value to remove from this DelegateDeclarationCollection.
 /// </param>
 public virtual void Remove(DelegateDeclaration value)
 {
     this.List.Remove(value);
 }
 /// <summary>
 /// Initializes a new instance of the DelegateDeclarationCollection class, containing elements
 /// copied from an array.
 /// </summary>
 /// <param name="items">
 /// The array whose elements are to be added to the new DelegateDeclarationCollection.
 /// </param>
 public DelegateDeclarationCollection(DelegateDeclaration[] items)
 {
     this.AddRange(items);
 }
 /// <summary>
 /// Inserts an element into the DelegateDeclarationCollection at the specified index
 /// </summary>
 /// <param name="index">
 /// The index at which the DelegateDeclaration is to be inserted.
 /// </param>
 /// <param name="value">
 /// The DelegateDeclaration to insert.
 /// </param>
 public virtual void Insert(int index, DelegateDeclaration value)
 {
     this.List.Insert(index, value);
 }
 /// <summary>
 /// Return the zero-based index of the first occurrence of a specific value
 /// in this DelegateDeclarationCollection
 /// </summary>
 /// <param name="value">
 /// The DelegateDeclaration value to locate in the DelegateDeclarationCollection.
 /// </param>
 /// <returns>
 /// The zero-based index of the first occurrence of the _ELEMENT value if found;
 /// -1 otherwise.
 /// </returns>
 public virtual int IndexOf(DelegateDeclaration value)
 {
     return this.List.IndexOf(value);
 }
 /// <summary>
 /// Determines whether a specfic DelegateDeclaration value is in this DelegateDeclarationCollection.
 /// </summary>
 /// <param name="value">
 /// The DelegateDeclaration value to locate in this DelegateDeclarationCollection.
 /// </param>
 /// <returns>
 /// true if value is found in this DelegateDeclarationCollection;
 /// false otherwise.
 /// </returns>
 public virtual bool Contains(DelegateDeclaration value)
 {
     return this.List.Contains(value);
 }
 /// <summary>
 /// Adds the elements of an array to the end of this DelegateDeclarationCollection.
 /// </summary>
 /// <param name="items">
 /// The array whose elements are to be added to the end of this DelegateDeclarationCollection.
 /// </param>
 public virtual void AddRange(DelegateDeclaration[] items)
 {
     foreach (DelegateDeclaration item in items)
     {
         this.List.Add(item);
     }
 }
 /// <summary>
 /// Adds an instance of type DelegateDeclaration to the end of this DelegateDeclarationCollection.
 /// </summary>
 /// <param name="value">
 /// The DelegateDeclaration to be added to the end of this DelegateDeclarationCollection.
 /// </param>
 public virtual void Add(DelegateDeclaration value)
 {
     this.List.Add(value);
 }