Export (0) Print
Expand All
Expand Minimize

Namespace Property (VCProjectEngine)

Visual Studio .NET 2003

Sets or returns an object defining the parent namespace.

[Visual Basic .NET]
Public Property Namespace() As String
[Visual Basic 6]
Property Get Namespace() As String
Property Let Namespace( _
   ByVal NewValue As String _
) 
[C++]
HRESULT __stdcall get_Namespace(
   /* [out, retval] */ BSTR* retVal
);
HRESULT __stdcall put_Namespace(
   /* [in] */ BSTR NewValue
);
[C#]
public string Namespace {get; set;}
[JScript .NET]
public function get Namespace() : String
public function set Namespace(
   NewValue : String
)

Parameters

NewValue
A string specifying the name of the namespace.

Return Value

A string specifying the name of the namespace.

Remarks

Namespace must match the root namespace of the project.

In many cases, the value of Namespace is the same as the name of the library that you are wrapping.

Example

' Add a reference to Microsoft.VisualStudio.VCProjectEngine and have a 
' Visual C++ .NET project loaded before running this example.
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine
Public Module Module1
    Sub Test()
        Dim prj As VCProject
        Dim cfgs, tools As IVCCollection
        Dim cfg As VCConfiguration
        Dim tool As VCManagedWrapperGeneratorTool
        prj = DTE.Solution.Projects.Item(1).Object
        cfgs = prj.Configurations
        cfg = cfgs.Item(1)
        tool = cfg.Tools("VCManagedWrapperGeneratorTool")
        MsgBox("Current namespace : " & _
          tool.Namespace)
    End Sub
End Module

See Samples for Project Model Extensibility for information on how to compile and run this sample.

See Also

Applies To: VCManagedWrapperGeneratorTool Object | VCWebServiceProxyGeneratorTool Object

Show:
© 2014 Microsoft