語言

ConfigurationSection.TryGetValue(String, String) 方法

定義

嘗試取得此段的值為字串。

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

適用於