XmlTextReader.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

屬性的索引。

屬性值

屬性的值。

適用於

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

屬性的限定名稱。

屬性值

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

備註

這種特性不會打動讀者。

若讀取器位於節點 DocumentType 上,此方法可用來取得 PUBLIC 與 SYSTEM 文字,例如 reader["PUBLIC"]

適用於

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

適用於