SolutionConfiguration2.Name Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the name of the object.
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
Property Value
The name of the object.
Implements
- Attributes
Examples
This example displays the active solution configuration item's name for the first item. Open a project in the Visual Studio integrated development environment (IDE) before running this example.
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());
}
}