Expression.IsValidValue Eigenschaft

Definition

Gibt an, ob der angegebene Wert in einem Ausdruck gültig ist.

public:
 property bool IsValidValue { bool get(); };
public:
 property bool IsValidValue { bool get(); };
[System.Runtime.InteropServices.DispId(103)]
public bool IsValidValue { [System.Runtime.InteropServices.DispId(103)] get; }
[<System.Runtime.InteropServices.DispId(103)>]
[<get: System.Runtime.InteropServices.DispId(103)>]
member this.IsValidValue : bool
Public ReadOnly Property IsValidValue As Boolean

Eigenschaftswert

Boolean

Ein boolescher Wert.

Attribute

Beispiele

Im folgenden Beispiel wird die Verwendung der- IsValidValue Eigenschaft veranschaulicht.

public static void IsValidValue(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("IsValidValue property: ");  
    owp.Activate();  

    EnvDTE.Expression exp = dte.Debugger.GetExpression("tempC", true, 1);  
    if(exp.IsValidValue)  
        owp.OutputString("The specified value in an expression is valid.");  
    else  
        owp.OutputString("The specified value in an expression is invalid.");  
}  
Shared Sub IsValidValue(ByRef dte As EnvDTE.DTE)  
    Dim exp As EnvDTE.Expression = dte.Debugger.GetExpression("tempC", True, 1)  
    If exp.IsValidValue Then  
        MessageBox.Show("The specified value in an expression is valid.", _  
                        "Expression Test - IsValidValue Property")  
    Else  
        MessageBox.Show("The specified value in an expression is invalid.", _  
                        "Expression Test - IsValidValue Property")  
    End If  
End Sub  

Hinweise

Gibt zurück, true Wenn der Wert im Ausdruck gültig ist, andernfalls wird zurückgegeben false .

Gilt für