Freigeben über


XmlArrayAttribute-Konstruktor ()

Initialisiert eine neue Instanz der XmlArrayAttribute-Klasse.

Namespace: System.Xml.Serialization
Assembly: System.Xml (in system.xml.dll)

Syntax

'Declaration
Public Sub New
'Usage
Dim instance As New XmlArrayAttribute
public XmlArrayAttribute ()
public:
XmlArrayAttribute ()
public XmlArrayAttribute ()
public function XmlArrayAttribute ()

Hinweise

Weitere Informationen über das Verwenden von Attributen finden Sie unter Erweitern von Metadaten mithilfe von Attributen.

Beispiel

Im folgenden Beispiel wird XmlArrayAttribute zwei Arrays zugewiesen.

Public Class MyClass1
    <XmlArrayAttribute()> Public MyStringArray() As String
    <XmlArrayAttribute()> Public MyIntegerArray() As Integer
End Class
public class MyClass
{
    [XmlArrayAttribute()]
    public string [] MyStringArray;
    [XmlArrayAttribute()]
    public int [] MyIntegerArray;
}
public ref class MyClass
{
public:

   [XmlArrayAttribute]
   array<String^>^MyStringArray;

   [XmlArrayAttribute]
   array<Int32>^MyIntegerArray;
};
public class MyClass
{
    /** @attribute XmlArrayAttribute()
     */
    public String myStringArray[];

    /** @attribute XmlArrayAttribute()
     */
    public int myIntegerArray[];
} //MyClass

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, 1.0

Siehe auch

Referenz

XmlArrayAttribute-Klasse
XmlArrayAttribute-Member
System.Xml.Serialization-Namespace
XmlArrayItemAttribute
XmlSerializer