Answers for "deserialize xml c#"

C#
0

deserialize xml c#

// Construct an instance of the XmlSerializer with the type
// of object that is being deserialized.
var mySerializer = new XmlSerializer(typeof(MySerializableClass));
// To read the file, create a FileStream.
using var myFileStream = new FileStream("myFileName.xml", FileMode.Open);
// Call the Deserialize method and cast to the object type.
var myObject = (MySerializableClass)mySerializer.Deserialize(myFileStream);
Posted by: Guest on March-09-2021

C# Answers by Framework

Browse Popular Code Answers by Language