How can we pass different Object from a given function.
static public void SerializeToXML(FbTextView p)
{
XmlSerializer serializer = new XmlSerializer(typeof(FbTextView));
TextWriter textWriter = new StreamWriter(@"D:\movie.xml");
serializer.Serialize(textWriter, p);
textWriter.Close();
}
now the problem is that when I try to pass two or more then two objects like this:
static public void SerializeToXML(FbTextView p,FbTextField q)
{
XmlSerializer serializer = new XmlSerializer(typeof(FbTextView));
XmlSerializer Serializer = new XmlSerializer(typeof(FbTextField));
TextWriter textWriter = new StreamWriter(@"D:\movie.xml");
serializer.Serialize(textWriter, p);
textWriter.Close();
}
it throw error: XMLParse Exception Was unhandled. and the inner exception is :
“There was an error reflecting type ‘FBformBuilder.FbTextField”
thanks !
The problem will be fully detailed in the inner exceptions; try:
then look at all the
.Messages that get logged. One of these will tell you the exact problem. For example, it could be something like:or something similar