Like it

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() );  


No comments:

Post a Comment