Freigeben über


CodeNamespaceCollection.Add-Methode

Fügt der Auflistung den angegebenen CodeNamespace hinzu.

Namespace: System.CodeDom
Assembly: System (in system.dll)

Syntax

'Declaration
Public Function Add ( _
    value As CodeNamespace _
) As Integer
'Usage
Dim instance As CodeNamespaceCollection
Dim value As CodeNamespace
Dim returnValue As Integer

returnValue = instance.Add(value)
public int Add (
    CodeNamespace value
)
public:
int Add (
    CodeNamespace^ value
)
public int Add (
    CodeNamespace value
)
public function Add (
    value : CodeNamespace
) : int

Parameter

Rückgabewert

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

Beispiel

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

Plattformen

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

Siehe auch

Referenz

CodeNamespaceCollection-Klasse
CodeNamespaceCollection-Member
System.CodeDom-Namespace
AddRange