NameValueCollection.Get 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取组合成一个逗号分隔列表的 NameValueCollection 指定条目的值。
重载
| 名称 | 说明 |
|---|---|
| Get(Int32) |
获取组合成一个逗号分隔列表的 NameValueCollection 指定索引处的值。 |
| Get(String) |
从组合到一个逗号分隔的列表中获取与指定键 NameValueCollection 关联的值。 |
Get(Int32)
- Source:
- NameValueCollection.cs
- Source:
- NameValueCollection.cs
- Source:
- NameValueCollection.cs
- Source:
- NameValueCollection.cs
- Source:
- NameValueCollection.cs
获取组合成一个逗号分隔列表的 NameValueCollection 指定索引处的值。
public:
virtual System::String ^ Get(int index);
public virtual string Get(int index);
public virtual string? Get(int index);
abstract member Get : int -> string
override this.Get : int -> string
Public Overridable Function Get (index As Integer) As String
参数
- index
- Int32
包含要从集合中获取的值的项的从零开始的索引。
返回
包含
例外
index 超出集合的有效索引范围。
注解
此方法是 O(n) 操作,其中 n 指定索引处的值数。
另请参阅
适用于
Get(String)
- Source:
- NameValueCollection.cs
- Source:
- NameValueCollection.cs
- Source:
- NameValueCollection.cs
- Source:
- NameValueCollection.cs
- Source:
- NameValueCollection.cs
从组合到一个逗号分隔的列表中获取与指定键 NameValueCollection 关联的值。
public:
virtual System::String ^ Get(System::String ^ name);
public virtual string Get(string name);
public virtual string? Get(string? name);
abstract member Get : string -> string
override this.Get : string -> string
Public Overridable Function Get (name As String) As String
参数
返回
一 String 个包含与指定键 NameValueCollection关联的值的逗号分隔列表(如果找到);否则为 null。
注解
Caution
如果找不到指定的键,此方法将返回 null 以下情况:1)如果找到指定的键并且其关联的值为 null,则为 2)。 此方法不区分这两种情况。
此方法是 O(n) 操作,其中 n 与指定键关联的值数。