110,579
社区成员
发帖
与我相关
我的任务
分享
string a="2-1+3";
object obj = Microsoft.JScript.Eval.JScriptEvaluate("1+2", Microsoft.JScript.Vsa.VsaEngine.CreateEngine()).ToString();
//obj=3
string s = "0,0,10,10";
int[] param = s.Split(',').Select(x => Convert.ToInt32(x)).ToArray();
Rectangle rect = new Rectangle(param[0], param[1], param[2], param[3]);
System.Xml.XmlWriter a = System.Xml.XmlWriter.Create("E:\\a.xml");
a.WriteStartDocument();
a.WriteStartElement("abc");
a.WriteValue(new Rectangle(0, 0, 10, 10)); //我想写入一个Rectangle,可以实现吗?如果不能,怎么保存Rectangle到xml中去呢?
a.Close();