Expression.Value Property
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets or gets the data for the object.
public:
property System::String ^ Value { System::String ^ get(); void set(System::String ^ value); };
public:
property Platform::String ^ Value { Platform::String ^ get(); void set(Platform::String ^ value); };
[System.Runtime.InteropServices.DispId(102)]
public string Value { [System.Runtime.InteropServices.DispId(102)] get; [System.Runtime.InteropServices.DispId(102)] set; }
[<System.Runtime.InteropServices.DispId(102)>]
[<get: System.Runtime.InteropServices.DispId(102)>]
[<set: System.Runtime.InteropServices.DispId(102)>]
member this.Value : string with get, set
Public Property Value As String
A string representing the value of the object.
- Attributes
The following example demonstrates how to use the Value property.
public static void Value(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("Value 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 Value(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
If an attribute is in the form name(someval, 2)
, then the value is someval, 2
.