static public void Serialize(AddressDetails details)
        {
            XmlSerializer serializer = new XmlSerializer(typeof(AddressDetails));

            using (TextWriter writer = new StreamWriter(@"C:\Dosya\Xml.xml"))
            {
                serializer.Serialize(writer, details);
            }
        }
        public static void Main(string[] args)
        {
            AddressDetails details = new AddressDetails();

            details.HouseNo    = 4;
            details.StreetName = "HEde";
            details.City       = "HedeninHedesi";
            Serialize(details);
        }