C# 序列化与反序列化之xml通过实现IXmlSerializable进行序列化的解决方案
2021-01-25 00:16
标签:ati 成功 mem 解决 项目 art reg gen 新建 新建控制台console项目,添加XmlPersonIXmlSerializable类,和AddressIXmlSerializable类(实现IXmlSerializable)以及AddressIXmlSerializable子类USAddressIXmlSerializable 代码如下: 主方法代码: 运行结果: C# 序列化与反序列化之xml通过实现IXmlSerializable进行序列化的解决方案 标签:ati 成功 mem 解决 项目 art reg gen 新建 原文地址:https://www.cnblogs.com/1175429393wljblog/p/12036441.htmlusing System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;
namespace SupremeConsole
{
#region 测试IXmlSerializable
public class XmlPersonIXmlSerializable
{
///
using log4net;
using System;
using System.Data;
using System.Data.SQLite;
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
using System.IO.MemoryMappedFiles;
using System.IO.Pipes;
using System.Linq;
using System.Net;
using System.Security.AccessControl;
using System.Security.Principal;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Serialization;
using System.Reflection;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.Runtime.Serialization;
using System.Collections.Generic;
namespace SupremeConsole
{
class Program
{
static void Main(string[] args)
{
XmlPersonIXmlSerializable xmlPersonIXmlSerializable = new XmlPersonIXmlSerializable { Name = "11111", HomeAddress = new AddressIXmlSerializable { Street = "大街三三号", PostCode = "123" } };
string s = SerializeManager.Instance.XmlSerialize
文章标题:C# 序列化与反序列化之xml通过实现IXmlSerializable进行序列化的解决方案
文章链接:http://soscw.com/index.php/essay/46561.html