SolutionConfiguration2.Name Eigenschaft

Definition

Ruft den Namen des Objekts ab.

public:
 property System::String ^ default { System::String ^ get(); };
public:
 property Platform::String ^ default { Platform::String ^ get(); };
[System.Runtime.InteropServices.DispId(0)]
public string this { [System.Runtime.InteropServices.DispId(0)] get; }
[<System.Runtime.InteropServices.DispId(0)>]
[<get: System.Runtime.InteropServices.DispId(0)>]
member this.Name : string
Default Public ReadOnly Property Name As String

Eigenschaftswert

String

Der Name des Objekts.

Implementiert

Attribute

Beispiele

In diesem Beispiel wird der Name des aktiven Projektmappenkonfigurationselements für das erste Element angezeigt. Öffnen Sie ein Projekt in der Visual Studio integrierten Entwicklungsumgebung (Integrated Development Environment, IDE), bevor Sie dieses Beispiel ausführen.

Imports EnvDTE  
Imports EnvDTE80  
Sub SolutionConfigurationNameExample(ByVal dte As DTE2)  
    Try  
        Dim builder As SolutionBuild = _  
        _applicationObject.Solution.SolutionBuild  
        Dim config As SolutionConfiguration2  
        config = CType(builder.SolutionConfigurations.Item(1) _  
        , SolutionConfiguration2)  
        MsgBox("The name of the solution configuration is: "  _  
        & config.Name)  
    Catch ex As System.Exception  
        MsgBox(ex.ToString)  
    End Try  
End Sub  
using EnvDTE;  
using EnvDTE80;  
using System.Windows.Forms;  
public void OnConnection(object application,   
public void SolutionConfigurationNameExample(DTE2 dte)  
{  
    try  
    {  
        SolutionBuild builder =  
 _applicationObject.Solution.SolutionBuild;  
        SolutionConfiguration2 config;  
        config =  
 (SolutionConfiguration2)builder.SolutionConfigurations.Item(1);  
        MessageBox.Show("The name of the solution configuration is: "   
+ config.Name);  
    }  
    catch(SystemException ex)  
    {  
        MessageBox.Show(ex.ToString());  
    }  
}  

Gilt für