110,552
社区成员
发帖
与我相关
我的任务
分享
public static class Canshu
{
public static int length = 90;
public static int width = 30;
}
string filename = Application.StartupPath + @"\canshu.xml";
XmlSerializer serializer =
new XmlSerializer(typeof(Canshu));
TextWriter writer = new StreamWriter(filename);
// Serialize the purchase order, and close the TextWriter.
serializer.Serialize(writer, SinLib.Canshu);//报错"SinLib.Canshu"是一个类型,这在给定的上下文中无效
writer.Close();