ConfigurationManager.Item(Object, String) Methode

Definition

Gibt ein-Objekt einer Auflistung zurück Configuration ConfigurationManager .

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

Parameter

index
Object

Erforderlich. Ein absoluter Index, eine GUID-Zeichenfolge oder der Name einer Konfiguration.

Platform
String

(Optional) Der Name der Plattform.

Gibt zurück

Configuration

Ein Configuration-Objekt.

Attribute

Beispiele

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  

Hinweise

Item Gibt die Konfiguration bei zurück Index . Dieses Objekt ist in Zeilen Hauptreihen Folge mit Projekt-/projektelementkonfigurationsnamen, die Zeilen bilden, und Platt Form Namen, die Spalten bilden.

Wenn index ein Long-Datentyp ist, dann handelt es sich um einen Zeilen Hauptindex in der Matrix, und das- Platform Argument wird ignoriert. Wenn index ein Zeichen folgen-Datentyp ist, ist es ein Projekt-/projektelementkonfigurationsname, Platform der als Platt Form Name angegeben werden muss. Bei Projekten, die keine Plattformen unterstützen, kann dieses Argument eine leere Zeichenfolge sein.

Gilt für