SymbolResolver.TryGetValue(String, Object) 方法

定义

获取与指定键关联的值。Gets the value associated with the specified key.

public:
 virtual bool TryGetValue(System::String ^ key, [Runtime::InteropServices::Out] System::Object ^ % value);
public bool TryGetValue (string key, out object value);
abstract member TryGetValue : string * obj -> bool
override this.TryGetValue : string * obj -> bool
Public Function TryGetValue (key As String, ByRef value As Object) As Boolean

参数

key
String

要获取的值的键。The key of the value to get.

value
Object

当此方法返回时,如果找到指定的键,则包含与该关联的值;否则包含值参数的类型默认值。When this method returns, contains the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. 此参数未经初始化即被传递。This parameter is passed uninitialized.

返回

如果 true 包含具有指定键的元素,则为 SymbolResolver;否则为 falsetrue if the SymbolResolver contains an element with the specified key; otherwise, false.

适用于