Like it

Showing posts with label XML Tips. Show all posts
Showing posts with label XML Tips. Show all posts

Sunday, July 10, 2011

System.Xml.Serialization.XmlSerializer.XmlSerializer() is inaccessible due to its protection level

One reason for this error is if you haven't mentioned the type when you initialize the XmlSerializer object

XmlSerializer Xser = new XmlSerializer()  

can be replaced with

XmlSerializer Xser = new XmlSerializer(this.GetType() );