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