HttpFileCollectionWrapper.Item[] 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
按名称或索引从文件集合中获取已发布的文件对象。
重载
| 名称 | 说明 |
|---|---|
| Item[Int32] |
获取指定索引处的已发布文件对象。 |
| Item[String] |
获取具有集合中指定名称的已发布文件对象。 |
Item[Int32]
获取指定索引处的已发布文件对象。
public:
virtual property System::Web::HttpPostedFileBase ^ default[int] { System::Web::HttpPostedFileBase ^ get(int index); };
public override System.Web.HttpPostedFileBase this[int index] { get; }
member this.Item(int) : System.Web.HttpPostedFileBase
Default Public Overrides ReadOnly Property Item(index As Integer) As HttpPostedFileBase
参数
- index
- Int32
要获取的项的索引。
属性值
由 index.. 指定的已发布文件对象。
例外
index 超出集合的有效索引范围。
适用于
Item[String]
获取具有集合中指定名称的已发布文件对象。
public:
virtual property System::Web::HttpPostedFileBase ^ default[System::String ^] { System::Web::HttpPostedFileBase ^ get(System::String ^ name); };
public override System.Web.HttpPostedFileBase this[string name] { get; }
member this.Item(string) : System.Web.HttpPostedFileBase
Default Public Overrides ReadOnly Property Item(name As String) As HttpPostedFileBase
参数
- name
- String
要获取的对象的名称。
属性值
找到后 name的文件对象(如果找到);否则为 null。