XML Serialization

Devil231

New Member
How to serialize the properties in user control?I have tried the following code but I got InvalidOperationExceptio, While creating the XmlSerializer object \[code\]MyUserControl userControl = new MyUserControl();XmlSerializer serializer = new XmlSerializer(typeof(MyUserControl));Stream stream = new MemoryStream();TextWriter writer = new StreamWriter(stream);serializer.Serialize(writer, userControl); \[/code\]Exception: System.InvalidOperationException was unhandledHResult=-2146233079Message=There was an error reflecting type 'Demo.MyUserControl'.
 
Top