10 2013 档案

摘要:在开发过程中,会遇到很多需要使用序列化的场景,比如wcf,webservice或者jquery+.net等。那今天就说说我对序列化的理解。在.net中有几种序列化的方式,XML、二进制、SOAP、还有JSON。XML序列化xml序列化是使用namespace:System.Xml.Serialization下的class:XmlSerializer实现的。序列化之后使用xml格式的。现有类型 1: [XmlRoot("OnlineOrder")] 2: public class Order 3: { 4: private int orderId; 5: ... 阅读全文
posted @ 2013-10-27 11:23 JustDotNet 阅读(450) 评论(0) 推荐(0)
摘要:今天要学的是委托委托的基本形式直接上代码 1 public delegate int AddDelegate(int x,int y); 2 class Program 3 { 4 static void Main(string[] args) 5 { 6 int x=2;int y=5; 7 AddDelegate addDelegate = new AddDelegate(Add); 8 9 10 int result = addDelegate(x, y);11 ... 阅读全文
posted @ 2013-10-26 14:38 JustDotNet 阅读(291) 评论(0) 推荐(0)