Partager via


ConfigurationManager.Item(Object, String) Method

Definition

Returns a Configuration object of a ConfigurationManager collection.

EnvDTE::Configuration Item(winrt::Windows::Foundation::IInspectable const & index, std::wstring const & Platform = "");
[System.Runtime.InteropServices.DispId(0)]
public EnvDTE.Configuration Item (object index, string Platform = "");
[<System.Runtime.InteropServices.DispId(0)>]
abstract member Item : obj * string -> EnvDTE.Configuration
Public Function Item (index As Object, Optional Platform As String = "") As Configuration

Parameters

index
Object

Required. An absolute index, GUID string, or the name of a configuration.

Platform
String

Optional. The name of the platform.

Returns

A Configuration object.

Attributes

Examples

Sub ItemExample()  
   ' Before running, load a project.  
   ' Set references to all necessary objects.  
   Dim CM As ConfigurationManager = DTE.Solution.Projects.Item(1).ConfigurationManager  
   ' List the configuration name used for the current project.  
   MsgBox(CM.Item(2).ConfigurationName)  
End Sub  

Remarks

Item returns the configuration at Index. This object is in row-major order with project/project item configuration names forming rows, and platform names forming columns.

If index is a Long data type, then it is a row-major index into the matrix, and the Platform argument is ignored. If index is a String data type, then it is a project/project item configuration name and Platform must be supplied as the platform name. For projects that do not support any platforms, this argument can be an empty string.

Applies to