10 2013 档案
摘要:List phoneAppList = new List(); //对象列表 object obj = Newtonsoft.Json.JsonConvert.DeserializeObject(phoneApps, typeof(List)); //使用Newtonsoft装换 phoneAppList = (List)obj; //再强制转化一下
阅读全文
摘要:string xml=""+ ""+ ""+ "12345678"+ ""+ "2"+ ""+ ""+ " "+ ""+ ...
阅读全文
摘要:MemoryStream memoryStream = new MemoryStream(); //创建其支持存储区为内存的流。UnicodeEncoding uniEncoding = new UnicodeEncoding(); string str = "helloworld"; //要存入的字符串byte[] string1 = uniEncoding.GetBytes(str); //转化为字节memoryStream.Write(string1 , 0, string1 .Length); //写入流
阅读全文
摘要:this关键字引用类的当前实例,还可用作扩展方法的第一个参数的修饰符。public Employee(string name, string alias){ //用this来调用当前实例对象的name,alias this.name = name; this.alias = alias; } 将对象作为参数传递到其他方法,例如: class Employee { private string name; private string alias; private decimal salary = 3...
阅读全文
摘要:在recXmlDoc.Load(stream); 前加stream.Position = 0; 即可
阅读全文
摘要:set statistics time on select * from appset statistics time off
阅读全文
摘要:将数据作为XML数据发送,例如:public void PostXml(string url, string xml){byte[] bytes = Encoding.UTF8.GetBytes(xml);HttpWebRequest request = (HttpWebRequest) WebRequest.Create(url);request.Method = "POST";request.ContentLength = bytes.Length;request.ContentType = "text/xml";using (Stream requ
阅读全文

浙公网安备 33010602011771号