語言

IValueSource.TryGetValue(IValueDescriptor, BindingContext, Object) 方法

定義

從綁定上下文取得一個值。 回傳值表示是否存在與指定值描述符相符的值。

public:
 bool TryGetValue(System::CommandLine::Binding::IValueDescriptor ^ valueDescriptor, System::CommandLine::Binding::BindingContext ^ bindingContext, [Runtime::InteropServices::Out] System::Object ^ % boundValue);
public bool TryGetValue(System.CommandLine.Binding.IValueDescriptor valueDescriptor, System.CommandLine.Binding.BindingContext bindingContext, out object? boundValue);
public bool TryGetValue(System.CommandLine.Binding.IValueDescriptor valueDescriptor, System.CommandLine.Binding.BindingContext bindingContext, out object boundValue);
abstract member TryGetValue : System.CommandLine.Binding.IValueDescriptor * System.CommandLine.Binding.BindingContext * obj -> bool
Public Function TryGetValue (valueDescriptor As IValueDescriptor, bindingContext As BindingContext, ByRef boundValue As Object) As Boolean

參數

valueDescriptor
IValueDescriptor

綁定值的描述符。

bindingContext
BindingContext

這是綁定價值的綁定脈絡。

boundValue
Object

即是界定值。

傳回

true若找到匹配值;否則,。 false

適用於