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

適用於