This documentation is archived and is not being maintained.

Item Method (ConfigurationManager Collection)

Visual Studio .NET 2003

Returns an indexed member of a collection.

[Visual Basic .NET]
Public Function Item( _
   ByVal index As Object, _
   Optional ByVal Platform As Integer = -1 _
) As Command
[Visual Basic 6]
Function Item( _
   ByVal index As Variant, _
   Optional ByVal Platform As Long = -1 _
) As Command
HRESULT __stdcall Item(
   VARIANT index,
   long Platform,
   /* [out, retval] */ Command** retVal
public Command Item(
   object index,
   int Platform
[JScript .NET]
public function Item(
   index : Object,
   Platform : int
) : Command


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

Return Value

Returns a ConfigurationManager object.


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, then it is a row-major index into the matrix, and the Platform argument is ignored. If index is a String, 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.


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.
End Sub

See Also

Applies To: ConfigurationManager