CodeTypeDeclarationCollection.Add(CodeTypeDeclaration) Methode

Definition

Fügt der Auflistung das angegebene CodeTypeDeclaration-Objekt hinzu.

public:
 int Add(System::CodeDom::CodeTypeDeclaration ^ value);
public int Add (System.CodeDom.CodeTypeDeclaration value);
member this.Add : System.CodeDom.CodeTypeDeclaration -> int
Public Function Add (value As CodeTypeDeclaration) As Integer

Parameter

value
CodeTypeDeclaration

Das hinzuzufügende CodeTypeDeclaration-Objekt.

Gibt zurück

Int32

Der Index, an dem das neue Element eingefügt wurde.

Beispiele

Im folgenden Beispiel wird veranschaulicht, wie Sie die Add Methode verwenden, um einem Objekt ein CodeTypeDeclaration CodeTypeDeclarationCollectionObjekt hinzuzufügen.

// Adds a CodeTypeDeclaration to the collection.
collection->Add( gcnew CodeTypeDeclaration( "TestType" ) );
// Adds a CodeTypeDeclaration to the collection.
collection.Add( new CodeTypeDeclaration("TestType") );
' Adds a CodeTypeDeclaration to the collection.
collection.Add(New CodeTypeDeclaration("TestType"))

Gilt für:

Siehe auch