XmlElementAttributes.Item-Eigenschaft
Ruft ein XmlElementAttribute aus der Auflistung ab oder legt dieses fest.
Namespace: System.Xml.Serialization
Assembly: System.Xml (in system.xml.dll)
Syntax
'Declaration
Public Default Property Item ( _
index As Integer _
) As XmlElementAttribute
'Usage
Dim instance As XmlElementAttributes
Dim index As Integer
Dim value As XmlElementAttribute
value = instance(index)
instance(index) = value
public XmlElementAttribute this [
int index
] { get; set; }
public:
property XmlElementAttribute^ default [int] {
XmlElementAttribute^ get (int index);
void set (int index, XmlElementAttribute^ value);
}
/** @property */
public XmlElementAttribute get_Item (int index)
/** @property */
public void set_Item (int index, XmlElementAttribute value)
JScript unterstützt die Verwendung von indizierten Eigenschaften, aber nicht die Deklaration von neuen indizierten Eigenschaften.
Parameter
- index
Der nullbasierte Index des Auflistungsmembers, der abgerufen oder festgelegt werden soll.
Eigenschaftenwert
Das XmlElementAttribute am angegebenen Index.
Beispiel
Im folgenden Beispiel wird das erste XmlElementAttribute in einem XmlAttributes abgerufen.
Private Sub GetXmlElement(ByVal attrs As XmlAttributes)
' Get the first XmlElementAttribute in the collection.
Dim att As XmlElementAttribute = attrs.XmlElements(0)
' Get the Type of the XmlElementAttribute and print it.
Dim t As Type = att.Type
Console.WriteLine(t.ToString())
End Sub
End Class
private void GetXmlElement(XmlAttributes attrs)
{
// Get the first XmlElementAttribute in the collection.
XmlElementAttribute att = attrs.XmlElements[0];
// Get the Type of the XmlElementAttribute and print it.
Type t = att.Type;
Console.WriteLine(t.ToString());
}
private:
void GetXmlElement( XmlAttributes^ attrs )
{
// Get the first XmlElementAttribute in the collection.
XmlElementAttribute^ att = attrs->XmlElements[ 0 ];
// Get the Type of the XmlElementAttribute and print it.
Type^ t = att->Type;
Console::WriteLine( t );
}
Plattformen
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile für Pocket PC, Windows Mobile für Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.
Versionsinformationen
.NET Framework
Unterstützt in: 2.0, 1.1, 1.0
.NET Compact Framework
Unterstützt in: 2.0
Siehe auch
Referenz
XmlElementAttributes-Klasse
XmlElementAttributes-Member
System.Xml.Serialization-Namespace