建立一个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();