ConfigurationProvider.TryGet(String, String) 方法

定義

嘗試尋找具有指定索引鍵的值。

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

參數

key
String

要查閱的索引鍵。

value
String

當這個方法傳回時,如果找到值,則包含位於 key的值。

傳回

true 如果索引鍵具有值,則為 , false 否則為 。

實作

適用於