Expression.Type Özellik
Nesne türünü gösteren bir sabit alır.
Ad alanı: EnvDTE
Derleme: EnvDTE (EnvDTE.dll içinde)
Sözdizimi
'Bildirim
ReadOnly Property Type As String
Get
string Type { get; }
property String^ Type {
String^ get ();
}
abstract Type : string
function get Type () : String
Özellik Değeri
Tür: System.String
Nesne türünü temsil eden bir dize sabiti.
Açıklamalar
Tür bir "int", "cstring" ya da "char" gibi bir ifade bir dize döndürür
Örnekler
Aşağıdaki örnek, nasıl kullanılacağını gösterir Type özelliği.
Bu özellik test etmek için:
Bir kesme noktası hedef uygulamanızda ayarlayın.
Hedef uygulama hata ayıklama modunda çalıştırın.
Uygulama kesme noktasında durur, eklentiyi çalıştırın.
public static void Type(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("Type property: ");
owp.Activate();
EnvDTE.Expression 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 Type(ByRef dte As EnvDTE.DTE)
Dim exp As EnvDTE.Expression = 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
- Anında arayanlar için tam güven. Bu üye kısmen güvenilen kodla kullanılamaz. Daha fazla bilgi için bkz. kısmen güvenilir kod tarafından Kitaplıklar kullanma.
Ayrıca bkz.
Başvuru
Diğer Kaynaklar
Nasıl Yapılır: derlemek ve otomasyon nesne modeli kod örnekleri çalıştırma