Advertisement
Guest User

Untitled

a guest
Apr 6th, 2016
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.Xml.Serialization;
  8.  
  9. namespace ConsoleApplication1
  10. {
  11. class Program
  12. {
  13. static void Main(string[] args)
  14. {
  15. XmlSerializer XmlSerializer = new XmlSerializer(typeof(ArrayOfFolkbokforingspostTYPE));
  16. StreamReader sr = new StreamReader("data.xml");
  17. ArrayOfFolkbokforingspostTYPE information = (ArrayOfFolkbokforingspostTYPE)XmlSerializer.Deserialize(sr);
  18. Console.WriteLine("Information:");
  19. foreach(var info in information.FolkbokforingspostTYPE)
  20. Console.WriteLine("Personnummer:" + info.Personpost.PersonId.PersonNr);
  21. Console.ReadKey();
  22. }
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement