I have written a class in C# and I have serilized into a file .I read
somewhere that if you want a class to be serializble you must add an
attribute called [Serializable] before the class and within the namespace,I
didn't do that but I could serialize it using the following code:
try
{
XmlSerializer s = new XmlSerializer( typeof( EnviroVars) );
s.Serialize( fs, enviromental_Vars );
}
catch(Exception ee)
{
MessageBox.Show(ee.Message + "**" + ee.StackTrace + "**" + ee.Source);
}
finally
{
fs.Close();
}
thanks for your help