語言

DirectoryAttribute.Item[Int32] 屬性

定義

該屬性會 Item[Int32] 取得或設定 DirectoryAttribute 物件在指定的索引位置。

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

參數

index
Int32

物件所在的零基指數值 DirectoryAttribute 。

屬性值

指定索引的 DirectoryAttribute 物件。

例外狀況

value 設定 是一個無效型別。 有效的型別有位元組[]、字串或URI。

value 包含一個空參考(Nothing 在 Visual Basic 中)。

備註

Get 方法 Item[] 總是嘗試將值物件轉換並以字串形式回傳;否則會回傳一個位元組陣列。 為了獲得更好的效能,如果你知道屬性值的回傳類型,就使用這個 GetValues 方法。

適用於