Aracılığıyla paylaş


Expression2.Name Özellik

Nesnenin adını alır.

Ad alanı:  EnvDTE100
Derleme:  EnvDTE100 (EnvDTE100.dll içinde)

Sözdizimi

'Bildirim
ReadOnly Default Property Name As String
string this { get; }
property String^ default {
    String^ get ();
}
abstract Name : string
function get Name () : String

Özellik Değeri

Tür: System.String
Nesnenin adını gösteren bir dizedir.

Örnekler

Aşağıdaki örnek, nasıl kullanılacağını gösterir Name özelliği.

Bu özellik test etmek için:

  1. Hedef uygulamanız bir kesme noktası ayarlayın.

  2. Hedef uygulama hata ayıklama modunda çalıştırın.

  3. Uygulama kesme noktasında durur eklentiyi çalıştırın.

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

.NET Framework Güvenliği

Ayrıca bkz.

Başvuru

Expression2 Arabirim

Name Fazla Yük

EnvDTE100 Ad Alanı

Diğer Kaynaklar

Nasıl yapılır: derlemek ve Otomasyon nesne modeli kod örneklerini çalıştırmak