NetDataContractSerializer.WriteObject(XmlWriter, Object) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将对象的完整内容(start、content 和 end)写入到具有指定对象的 XmlWriterXML 文档或流中。
public:
override void WriteObject(System::Xml::XmlWriter ^ writer, System::Object ^ graph);
public override void WriteObject(System.Xml.XmlWriter writer, object graph);
override this.WriteObject : System.Xml.XmlWriter * obj -> unit
Public Overrides Sub WriteObject (writer As XmlWriter, graph As Object)
参数
- graph
- Object
包含要写入的内容的对象。
例外
要序列化的类型不符合数据协定规则。 例如, DataContractAttribute 该属性尚未应用于该类型。
正在序列化的实例出现问题。
已超出要序列化的最大对象数。 请检查 MaxItemsInObjectGraph 属性。