mscorlib(4.0.0.0) API with additions
CodeDirectiveCollection.cs
1 using System.Collections;
3 
4 namespace System.CodeDom
5 {
8  [ClassInterface(ClassInterfaceType.AutoDispatch)]
9  [ComVisible(true)]
11  {
17  public CodeDirective this[int index]
18  {
19  get
20  {
21  return (CodeDirective)base.List[index];
22  }
23  set
24  {
25  base.List[index] = value;
26  }
27  }
28 
31  {
32  }
33 
39  {
40  AddRange(value);
41  }
42 
48  {
49  AddRange(value);
50  }
51 
55  public int Add(CodeDirective value)
56  {
57  return base.List.Add(value);
58  }
59 
64  public void AddRange(CodeDirective[] value)
65  {
66  if (value == null)
67  {
68  throw new ArgumentNullException("value");
69  }
70  for (int i = 0; i < value.Length; i++)
71  {
72  Add(value[i]);
73  }
74  }
75 
80  public void AddRange(CodeDirectiveCollection value)
81  {
82  if (value == null)
83  {
84  throw new ArgumentNullException("value");
85  }
86  int count = value.Count;
87  for (int i = 0; i < count; i++)
88  {
89  Add(value[i]);
90  }
91  }
92 
97  public bool Contains(CodeDirective value)
98  {
99  return base.List.Contains(value);
100  }
101 
110  public void CopyTo(CodeDirective[] array, int index)
111  {
112  base.List.CopyTo(array, index);
113  }
114 
118  public int IndexOf(CodeDirective value)
119  {
120  return base.List.IndexOf(value);
121  }
122 
129  public void Insert(int index, CodeDirective value)
130  {
131  base.List.Insert(index, value);
132  }
133 
137  public void Remove(CodeDirective value)
138  {
139  base.List.Remove(value);
140  }
141  }
142 }
CodeDirectiveCollection(CodeDirective[] value)
Initializes a new instance of the T:System.CodeDom.CodeDirectiveCollection class with the code direct...
Represents a collection of T:System.CodeDom.CodeDirective objects.
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
Provides the abstract base class for a strongly typed collection.
CodeDirectiveCollection(CodeDirectiveCollection value)
Initializes a new instance of the T:System.CodeDom.CodeDirectiveCollection class with the elements in...
Definition: __Canon.cs:3
int Add(CodeDirective value)
Adds the specified T:System.CodeDom.CodeDirective object to the collection.
void AddRange(CodeDirective[] value)
Adds an array of T:System.CodeDom.CodeDirective objects to the end of the collection.
void CopyTo(CodeDirective[] array, int index)
Copies the contents of the collection to a one-dimensional array beginning at the specified index.
void Insert(int index, CodeDirective value)
Inserts the specified T:System.CodeDom.CodeDirective object into the collection at the specified inde...
void Remove(CodeDirective value)
Removes the specified T:System.CodeDom.CodeDirective object from the collection.
bool Contains(CodeDirective value)
Gets a value indicating whether the collection contains the specified T:System.CodeDom....
int IndexOf(CodeDirective value)
Gets the index in the collection of the specified T:System.CodeDom.CodeDirective object,...
void AddRange(CodeDirectiveCollection value)
Adds the contents of the specified T:System.CodeDom.CodeDirectiveCollection object to the end of the ...
Serves as the base class for code directive classes.
Definition: CodeDirective.cs:9
Specifies that the class can be serialized.
ClassInterfaceType
Identifies the type of class interface that is generated for a class.
CodeDirectiveCollection()
Initializes a new instance of the T:System.CodeDom.CodeDirectiveCollection class.