MPe*_*ier 6 c# serialization xml-serialization .net-3.5 nonserializedattribute
如何使用XML序列化的公共访问器指定NonSerialized字段?
[NonSerialized]
public String _fooBar;
//Declaring the property here will serialize the _fooBar field
public String FooBar
{
get { return _fooBar; }
set { _fooBar = value; }
}
Run Code Online (Sandbox Code Playgroud)