語言

XmlNodeReader.Item[] 屬性

定義

多載

名稱 Description
Item[Int32]

取得帶有指定索引的屬性值。

Item[String]

當在衍生類別中覆寫時,會得到指定名稱屬性的值。

Item[String, String]

取得具有指定本地名稱與命名空間 URI 的屬性值。

Item[Int32]

取得帶有指定索引的屬性值。

public:
 virtual property System::String ^ default[int] { System::String ^ get(int i); };
public override string this[int i] { get; }
member this.Item(int) : string
Default Public Overrides ReadOnly Property Item(i As Integer) As String

參數

i
Int32

屬性的索引。

屬性值

指定屬性的值。

例外狀況

i 小於 0 或大於或等於 AttributeCount。

備註

建議做法是使用XmlReader類別和XmlReaderSettings方法來建立Create實例。

這種特性不會打動讀者。

另請參閱

適用於

Item[String]

當在衍生類別中覆寫時,會得到指定名稱屬性的值。

public:
 virtual property System::String ^ default[System::String ^] { System::String ^ get(System::String ^ name); };
public override string this[string name] { get; }
member this.Item(string) : string
Default Public Overrides ReadOnly Property Item(name As String) As String

參數

name
String

屬性值

適用於

Item[String, String]

取得具有指定本地名稱與命名空間 URI 的屬性值。

public:
 virtual property System::String ^ default[System::String ^, System::String ^] { System::String ^ get(System::String ^ name, System::String ^ namespaceURI); };
public override string this[string name, string namespaceURI] { get; }
member this.Item(string * string) : string
Default Public Overrides ReadOnly Property Item(name As String, namespaceURI As String) As String

參數

name
String

該屬性的當地名稱。

namespaceURI
String

屬性的命名空間 URI。

屬性值

指定屬性的值。 若未找到該屬性,則 null 返回。

備註

Note

為了利用新功能,建議的做法是使用XmlReader該類別和該XmlReaderSettings方法來建立Create實例。 欲了解更多資訊,請參閱參考頁面的 XmlReader 備註區。

這種特性不會打動讀者。

另請參閱

適用於