ConfigurationSection.TryGetValue(String, String) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
嘗試取得此段的值為字串。
public:
bool TryGetValue(System::String ^ key, [Runtime::InteropServices::Out] System::String ^ % value);
public bool TryGetValue(string? key, out string? value);
member this.TryGetValue : string * string -> bool
Public Function TryGetValue (key As String, ByRef value As String) As Boolean
參數
- key
- String
設定鍵。 若 null,則返回該區段本身的值。
- value
- String
當此方法回傳時,若該區段存在,則包含該區段的值;否則,。 null
傳回
true若找到該值;否則,。 false