Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace WindowsFormsApplication7
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- public class Profile
- {
- public String Name;
- public int ageOrSomeOtherStuff;
- }
- public class Item
- {
- public string Name { get; set; }
- public string Directory { get; set; }
- public string Norm_prefix { get; set; }
- public string Spec_prefix { get; set; }
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- Profile myObject = new Profile();
- XmlSerializer mySerializer = new
- XmlSerializer(typeof(Profile));
- myObject.Itemstack.Name = "canvas"; // How do i put things into the class Profile ?
- StreamWriter myWriter = new StreamWriter("c:/myFileName.xml");
- mySerializer.Serialize(myWriter, myObject);
- myWriter.Close();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement