Expression2.Name Propriété
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Obtient le nom de l'objet.
public:
property System::String ^ default { System::String ^ get(); };
public:
property Platform::String ^ default { Platform::String ^ get(); };
[System.Runtime.InteropServices.DispId(0)]
public string this { [System.Runtime.InteropServices.DispId(0)] get; }
[<System.Runtime.InteropServices.DispId(0)>]
[<get: System.Runtime.InteropServices.DispId(0)>]
member this.Name : string
Default Public ReadOnly Property Name As String
Valeur de propriété
Chaîne qui représente le nom de l'objet.
Implémente
- Attributs
Exemples
L’exemple suivant montre comment utiliser la Name propriété.
public static void Name(DTE dte)
{
// Setup debug Output window.
Window w = (Window)dte.Windows.Item(EnvDTE.Constants.vsWindowKindOutput);
w.Visible = true;
OutputWindow ow = (OutputWindow)w.Object;
OutputWindowPane owp = ow.OutputWindowPanes.Add("Name property: ");
owp.Activate();
EnvDTE100.Expression2 exp = dte.Debugger.GetExpression("tempC", true, 1);
owp.OutputString("\nThe name of the expression: " + exp.Name);
owp.OutputString("\nThe type of the expression: " + exp.Type);
owp.OutputString("\nThe value of the expression: " + exp.Value);
}
Shared Sub Name(ByRef dte As EnvDTE.DTE)
Dim exp As EnvDTE100.Expression2 = dte.Debugger.GetExpression("tempC", True, 1)
Dim str As String
str = "The name of the expression: " + exp.Name
str += vbCrLf + "The type of the expression: " + exp.Type
str += vbCrLf + "The value of the expression: " + exp.Value
MessageBox.Show(str, "Expression Test - Name, Type, Value Properties")
End Sub