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.