ConfigurationManager.Item Method

Returns a Configuration object of a ConfigurationManager collection.

Namespace:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

Syntax

'Declaration
Function Item ( _
    index As Object, _
    Platform As String _
) As Configuration
Configuration Item(
    Object index,
    string Platform
)
Configuration^ Item(
    [InAttribute] Object^ index, 
    String^ Platform
)
abstract Item : 
        index:Object * 
        Platform:string -> Configuration
function Item(
    index : Object, 
    Platform : String
) : Configuration

Parameters

  • index
    Type: System.Object

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

  • Platform
    Type: System.String

    Optional. The name of the platform.

Return Value

Type: EnvDTE.Configuration
A Configuration object.

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.

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

.NET Framework Security

See Also

Reference

ConfigurationManager Interface

EnvDTE Namespace