Chashitsu

XML object serializer in C#

Aug 15th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.39 KB | None | 0 0
  1.             string path = @"c:\a\ERepositoryDebug_" + DateTime.Now.ToString("dd-MM-yyyy__hh.mm.ss") + ".xml";
  2.             System.Xml.Serialization.XmlSerializer writer =
  3.                 new System.Xml.Serialization.XmlSerializer(typeof(FileNewMetadata));
  4.             System.IO.FileStream file = System.IO.File.Create(path);
  5.             writer.Serialize(file, metadata);
  6.             file.Close();
Add Comment
Please, Sign In to add comment