Share via


WebRequestModuleElementCollection.Item[] 属性

定义

获取或设置具有指定索引或键的元素。

重载

Item[Int32]

获取或设置集合中指定位置的元素。

Item[String]

获取或设置具有指定键的元素。

Item[Int32]

获取或设置集合中指定位置的元素。

public:
 property System::Net::Configuration::WebRequestModuleElement ^ default[int] { System::Net::Configuration::WebRequestModuleElement ^ get(int index); void set(int index, System::Net::Configuration::WebRequestModuleElement ^ value); };
public System.Net.Configuration.WebRequestModuleElement this[int index] { get; set; }
member this.Item(int) : System.Net.Configuration.WebRequestModuleElement with get, set
Default Public Property Item(index As Integer) As WebRequestModuleElement

参数

index
Int32

元素的从零开始的索引。

属性值

位于指定位置的 WebRequestModuleElement

适用于

Item[String]

获取或设置具有指定键的元素。

public:
 property System::Net::Configuration::WebRequestModuleElement ^ default[System::String ^] { System::Net::Configuration::WebRequestModuleElement ^ get(System::String ^ name); void set(System::String ^ name, System::Net::Configuration::WebRequestModuleElement ^ value); };
public System.Net.Configuration.WebRequestModuleElement this[string name] { get; set; }
member this.Item(string) : System.Net.Configuration.WebRequestModuleElement with get, set
Default Public Property Item(name As String) As WebRequestModuleElement

参数

name
String

集合中的元素的键。

属性值

具有指定键的 WebRequestModuleElement;如果没有具有指定键的元素,则为 null

适用于