返回首页

我在我的项目定义用户控制,他们property.i保存使用XML他们的财产时,点击保存按钮。
请帮我
我的代码是这样的:


       private string condition;

       public string Condition

       {

           get { return condition; }

           set { condition = value; }

       }

       private bool checkwhile;

 

       public bool CheckWhile

       {

           get { return checkwhile; }

           set { checkwhile = value; }

       }

       private bool checkfor;

 

       public bool CheckFor

       {

           get { return checkfor; }

           set { checkfor = value; }

       }

 

       public int Iteration

       {

           get { return iteration; }

           set { iteration = value; }

       }

回答

评论会员:msh66 时间:2012/02/06
{C}
}
评论会员:游客 时间:2012/02/06
SAKryukov:使用数据合同。添加适当的属性[DataConract]和[的DataMembers]你的类型和成员,你需要合同(部分或全部成员可以是私有的,不要紧)的一部分,使用DataContractSerializer的或DataContractJsonSerializer。进一步的细节,请参阅:imgsrc=]看到我过去的解决方案:{A},{A2}{A3}]mdash;SA