Bagikan melalui


ConfigurationElement.DeserializeElement(XmlReader, Boolean) Metode

Definisi

Membaca XML dari file konfigurasi.

protected:
 virtual void DeserializeElement(System::Xml::XmlReader ^ reader, bool serializeCollectionKey);
protected public:
 virtual void DeserializeElement(System::Xml::XmlReader ^ reader, bool serializeCollectionKey);
protected virtual void DeserializeElement (System.Xml.XmlReader reader, bool serializeCollectionKey);
protected internal virtual void DeserializeElement (System.Xml.XmlReader reader, bool serializeCollectionKey);
abstract member DeserializeElement : System.Xml.XmlReader * bool -> unit
override this.DeserializeElement : System.Xml.XmlReader * bool -> unit
Protected Overridable Sub DeserializeElement (reader As XmlReader, serializeCollectionKey As Boolean)
Protected Friend Overridable Sub DeserializeElement (reader As XmlReader, serializeCollectionKey As Boolean)

Parameter

reader
XmlReader

XmlReader Yang membaca dari file konfigurasi.

serializeCollectionKey
Boolean

true untuk menserialisasikan hanya properti kunci koleksi; jika tidak, false.

Pengecualian

Elemen yang akan dibaca dikunci.

-atau-

Atribut simpul saat ini tidak dikenali.

-atau-

Status kunci simpul saat ini tidak dapat ditentukan.

Contoh

Contoh berikut menunjukkan cara memperluas DeserializeElement metode.

protected override void DeserializeElement(
   System.Xml.XmlReader reader, 
    bool serializeCollectionKey)
{
    base.DeserializeElement(reader, 
        serializeCollectionKey);
    // You can your custom processing code here.
}
Protected Overrides Sub DeserializeElement(ByVal reader _
    As System.Xml.XmlReader, _
    ByVal serializeCollectionKey As Boolean)

    MyBase.DeserializeElement(reader, _
        serializeCollectionKey)
    ' Enter your custom processing code here.
End Sub

Berlaku untuk