|
Dieser Artikel wurde maschinell übersetzt. Bewegen Sie den Mauszeiger über die Sätze im Artikel, um den Originaltext anzuzeigen. Weitere Informationen
|
Übersetzung
Original
|
CodeDirectiveCollection-Klasse
.NET Framework 4.5
Namespace: System.CodeDom
Assembly: System (in System.dll)
Der CodeDirectiveCollection-Typ macht die folgenden Member verfügbar.
| Name | Beschreibung | |
|---|---|---|
![]() | CodeDirectiveCollection() | |
![]() | CodeDirectiveCollection(CodeDirective[]) | |
![]() | CodeDirectiveCollection(CodeDirectiveCollection) |
| Name | Beschreibung | |
|---|---|---|
![]() | Capacity | |
![]() | Count | |
![]() | InnerList | |
![]() | Item | |
![]() | List |
| Name | Beschreibung | |
|---|---|---|
![]() | Add | |
![]() | AddRange(CodeDirective[]) | |
![]() | AddRange(CodeDirectiveCollection) | |
![]() | Clear | |
![]() | Contains | |
![]() | CopyTo | |
![]() | Equals(Object) | |
![]() | Finalize | |
![]() | GetEnumerator | |
![]() | GetHashCode | |
![]() | GetType | |
![]() | IndexOf | |
![]() | Insert | |
![]() | MemberwiseClone | |
![]() | OnClear | |
![]() | OnClearComplete | |
![]() | OnInsert | |
![]() | OnInsertComplete | |
![]() | OnRemove | |
![]() | OnRemoveComplete | |
![]() | OnSet | |
![]() | OnSetComplete | |
![]() | OnValidate | |
![]() | Remove | |
![]() | RemoveAt | |
![]() | ToString |
| Name | Beschreibung | |
|---|---|---|
![]() ![]() | ICollection.CopyTo | |
![]() ![]() | ICollection.IsSynchronized | |
![]() ![]() | ICollection.SyncRoot | |
![]() ![]() | IList.Add | |
![]() ![]() | IList.Contains | |
![]() ![]() | IList.IndexOf | |
![]() ![]() | IList.Insert | |
![]() ![]() | IList.IsFixedSize | |
![]() ![]() | IList.IsReadOnly | |
![]() ![]() | IList.Item | |
![]() ![]() | IList.Remove |
// Creates an empty CodeDirectiveCollection. CodeDirectiveCollection collection = new CodeDirectiveCollection(); // Adds a CodeDirective to the collection. collection.Add(new CodeRegionDirective(CodeRegionMode.Start, "Region1")); // Adds an array of CodeDirective objects to the collection. CodeDirective[] directives = { new CodeRegionDirective(CodeRegionMode.Start,"Region1"), new CodeRegionDirective(CodeRegionMode.End,"Region1") }; collection.AddRange(directives); // Adds a collection of CodeDirective objects to the collection. CodeDirectiveCollection directivesCollection = new CodeDirectiveCollection(); directivesCollection.Add(new CodeRegionDirective(CodeRegionMode.Start, "Region2")); directivesCollection.Add(new CodeRegionDirective(CodeRegionMode.End, "Region2")); collection.AddRange(directivesCollection); // Tests for the presence of a CodeDirective in the // collection, and retrieves its index if it is found. CodeDirective testDirective = new CodeRegionDirective(CodeRegionMode.Start, "Region1"); int itemIndex = -1; if (collection.Contains(testDirective)) itemIndex = collection.IndexOf(testDirective); // Copies the contents of the collection beginning at index 0 to the specified CodeDirective array. // 'directives' is a CodeDirective array. collection.CopyTo(directives, 0); // Retrieves the count of the items in the collection. int collectionCount = collection.Count; // Inserts a CodeDirective at index 0 of the collection. collection.Insert(0, new CodeRegionDirective(CodeRegionMode.Start, "Region1")); // Removes the specified CodeDirective from the collection. CodeDirective directive = new CodeRegionDirective(CodeRegionMode.Start, "Region1"); collection.Remove(directive); // Removes the CodeDirective at index 0. collection.RemoveAt(0);
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core-Rolle wird nicht unterstützt), Windows Server 2008 R2 (Server Core-Rolle wird mit SP1 oder höher unterstützt; Itanium wird nicht unterstützt)
.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen für .NET Framework.

