C# xml序列化和反序列化
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Linq;
using?System.Text;
using?System.Threading.Tasks;
using?System.xml.Serialization;
namespace?XStream
{
????[xmlRoot(“PublicSetting“)]
????public?class?ConfigEntity
????{
????????private?SystemNode?_systemNode;
????????private?Other?_other;
????????[xmlElement(“Other“)]
????????public?Other?other
????????{
????????????set?{?_other?=?value;?}
????????????get?{?return?_other;?}
????????}
????????[xmlElement(“System“)]
????????public?SystemNode?systemNode
????????{
????????????set?{_systemNode?=?value;?}
????????????get?{?return?_systemNode;?}
????????}
????????//?????????public?DBConfig?dbConfig
????????//?????????{
????????//?????????????set?{?_dbConfig?=?value;?}
????????//?????????????get?{
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????6865??2017-07-20?17:58??PublicSetting.cs
?????文件????????2186??2017-07-18?15:44??xm
?????文件????????6078??2017-07-20?14:06??ConfigEntity.cs
評論
共有 條評論