Quantcast
Channel: Serialize class to XML? - Stack Overflow
Browsing latest articles
Browse All 3 View Live

Answer by Justin Niessner for Serialize class to XML?

If both of your classes were tagged with the [Serializable] attribute, then saving things to a file should be as simple as:var serializer = new XmlSerializer(typeof(Transport));using(var writer = new...

View Article


Answer by Smur for Serialize class to XML?

You need a stream and a XmlSerializer object, here's an example:FileStream fs = new FileStream(@"C:\MyPath", FileMode.OpenOrCreate);xmlSerializer = new...

View Article

Serialize class to XML?

I have the follow class and the list that holds it:public class Transport{ public string TransportType { get; set; } public string Mode { get; set; } public class Coordinates { public float ID { get;...

View Article
Browsing latest articles
Browse All 3 View Live




<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>