Expression.Type Property


Gets a constant indicating the object type.

Namespace:   EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

string Type { get; }

Property Value

Type: System.String

A string constant representing the object type.

Returns a string of the type of expression, such as "int", "CString", or "char."

The following example demonstrates how to use the Type property.

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: ");

    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);
Return to top