IConfigurationProvider.TryGet(String, String) 方法

定义

尝试获取指定键的配置值。

public:
 bool TryGet(System::String ^ key, [Runtime::InteropServices::Out] System::String ^ % value);
public bool TryGet (string key, out string value);
public bool TryGet (string key, out string? value);
abstract member TryGet : string * string -> bool
Public Function TryGet (key As String, ByRef value As String) As Boolean

参数

key
String

键。

value
String

此方法返回时,包含 值。

返回

如果找到指定键的值,则为 true;否则为 false

适用于