ConfigurationElement.DeserializeElement(XmlReader, Boolean) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
從組態檔讀取 XML。
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)
參數
- serializeCollectionKey
- Boolean
true
表示只針對集合主要屬性進行序列化,否則為 false
。
例外狀況
範例
下列範例示範如何擴充 DeserializeElement 方法。
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