最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
关于序列化-开心,转来一篇
时间:2022-07-02 11:40:01 编辑:袖梨 来源:一聚教程网
建立一个Serialization类,包括两个静态方法Save和Get。见程序中的
必须注意,对要序列化的类,以及其包括的其他结构和类,都必须用[Serializable]或者[NonSerialized]来标记。
NET Serialization By Vyacheslav Biktagirov
.NET enters in our life. So, we must at least learn what about new technoloy of. I think, that XML persistance is one of keys that make .NET belling so good.. OK. So what about persisting of? Imagine we have a class value. In C# termines, like that:
public class NiceClass
{
public long SomeLong=10;
private string str="Now nothing";
public int SomeInt=15;
public string SomeString
{
get
{
return str;
}
set
{
str=value;
}
}
public NiceClass()
{
}
}
Okay, it has some members and one property. Now, we get instance of such class:
NiceClass x=new NiceClass();
必须注意,对要序列化的类,以及其包括的其他结构和类,都必须用[Serializable]或者[NonSerialized]来标记。
NET Serialization By Vyacheslav Biktagirov
.NET enters in our life. So, we must at least learn what about new technoloy of. I think, that XML persistance is one of keys that make .NET belling so good.. OK. So what about persisting of? Imagine we have a class value. In C# termines, like that:
public class NiceClass
{
public long SomeLong=10;
private string str="Now nothing";
public int SomeInt=15;
public string SomeString
{
get
{
return str;
}
set
{
str=value;
}
}
public NiceClass()
{
}
}
Okay, it has some members and one property. Now, we get instance of such class:
NiceClass x=new NiceClass();
相关文章
- 以闪亮之名店长体验流霞季怎么玩 缘溪临霞套装活动介绍 12-31
- 未定事件簿旧梦新生左然篇怎么玩 旧梦新生左然篇活动介绍 12-31
- 未定事件簿左然破浪远行怎么样 12-31
- 桃源深处有人家行医问诊怎么玩 12-31
- 恋与制作人跨年福利有哪些 恋与制作人跨年福利内容介绍 12-31
- 阴阳师协同对弈大乱斗怎么玩 阴阳师协同对弈大乱斗活动介绍 12-31