- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
private static void ListXmlSerialize<T>(List<T> UserList, string Obj, string FileName)
{
object obj = new object();
lock (obj)
{
XmlSerializer UserXmlFormat = new XmlSerializer(typeof(List<T>), Obj);
Stream UserFileStream = new FileStream(FileName, FileMode.Create, FileAccess.Write, FileShare.Write);
UserXmlFormat.Serialize(UserFileStream, UserList);
UserFileStream.Close();
}
}