Share via


ConfigurationManager.Item, méthode

Retourne un objet Configuration dans une collection ConfigurationManager.

Espace de noms :  EnvDTE
Assembly :  EnvDTE (dans EnvDTE.dll)

Syntaxe

'Déclaration
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

Paramètres

  • index
    Type : System.Object
    Obligatoire.Index absolu, chaîne GUID ou nom d'une configuration.
  • Platform
    Type : System.String
    Facultatif.Nom de la plateforme.

Valeur de retour

Type : EnvDTE.Configuration
Objet Configuration.

Notes

Item retourne la configuration au paramètre Index. Cet objet est classé dans l'ordre ligne-champ, les noms de configurations de projet ou d'élément de projet constituant les lignes et les noms de plateformes constituant les colonnes.

Si le paramètre index correspond à un type de données Long, il s'agit alors d'un index ligne-champ dans la matrice, auquel cas l'argument Platform n'est pas pris en compte. Si le paramètre index correspond à un type de données String, il s'agit alors d'un nom de configuration de projet ou d'élément de projet, auquel cas l'argument Platform doit être indiqué en tant que nom de la plateforme. Pour les projets ne prenant pas en charge de plateformes, cet argument peut correspondre à une chaîne vide.

Exemples

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

Sécurité .NET Framework

Voir aussi

Référence

ConfigurationManager Interface

EnvDTE, espace de noms