至高吴上(Alfa.wu)

一个人,一生,能坚持做好一件事情是多么的牛XX啊!!!

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2013年9月3日

摘要: 摘 自: http://developer.51cto.com/art/200908/141145.htm实例分析如何精确C#日期格式到毫秒2009-08-03 10:48 paulfzm javaeye我要评论(0)字号:T|T有时候我们要对时间精确显示,甚至需要精确C#日期格式到毫秒,这里讲解的几种方法,希望能对大家有所启发。AD:2013云计算架构师峰会超低价抢票中有时候我们要对时间进行转换,达到不同的显示效果默认格式为:2009-6-24 14:33:34如果要换成成200906,06-2009,2009-6-24或更多的该怎么办呢我们要用到:DateTime.ToString的方法( 阅读全文
posted @ 2013-09-03 21:49 Alfa 阅读(616) 评论(0) 推荐(0) 编辑

摘要: 写在开头: 最近项目需求,需要在C#中处理json字符串,毫不犹豫的下载了Newtonsoft.Json 4.5.11(2012.12.17)http://json.codeplex.com/,然后百度教程,还比较多(心喜),大致方法类似如下:[csharp]view plaincopyusingNewtonsoft.Json;usingSystem.Text;StringBuildersb=newStringBuilder();stringstr="[{ID:'1',Name:'John',Other:[{Age:'21',Sex:& 阅读全文
posted @ 2013-09-03 21:47 Alfa 阅读(3450) 评论(0) 推荐(0) 编辑

摘要: 摘自: http://www.cnblogs.com/jams742003/archive/2009/12/24/1631587.html通过属性标签自定义JSON序列化JsonObjectAttribute:类修饰标签,用于控制类如何被序列化为一个json对象JsonArrayAttribute:集合修饰标签,用于控制集合如何被序列化为一个json对象JsonPropertyAttribute:域和属性修饰标签,用于控制它们如何被序列化为一个json对象中的属性JsonConverterAttribute:类,域,属性修饰标签,用于指定序列化期间的转换器示例代码:[JsonObject(Me 阅读全文
posted @ 2013-09-03 21:44 Alfa 阅读(806) 评论(0) 推荐(0) 编辑

摘要: 摘自: http://www.verydemo.com/demo_c360_i45119.html分类:编程语言/ASP.NET/文章导读:string googleSearchText = @"{ ""responseData"": { ""results"": [ { ""GsearchResultClass"": ""GwebSearch"", ""unescapedUrl"": 阅读全文
posted @ 2013-09-03 21:43 Alfa 阅读(3527) 评论(1) 推荐(2) 编辑

摘要: 引用: Newtonsoft.Json.dll// 引用:using Newtonsoft.Json;using Newtonsoft.Json.Converters;// 定义 实体测试类 public class Customer { public string name { get; set; } public string code { get; set; } public Customer() // 貌似空构造函数必须 { } ... 阅读全文
posted @ 2013-09-03 11:38 Alfa 阅读(2834) 评论(1) 推荐(0) 编辑

摘要: 摘 自: http://blog.sina.com.cn/s/blog_72b7a82d0100yyp8.htmlWebService基于SoapHeader实现安全认证[webservice][.net][安全][soapheader]本文仅提供通过设置SoapHeader来控制非法用户对WebService的调用,如果是WebService建议使用WSE3.0来保护Web服务,如果使用的是Viaual Studio 2008可以使用WCF,WCF里面提供了更多的服务认证方法。以下提供一种基于SoapHeader的自定义验证方式。1.首先要自定义SoapHeader,须继承System.We 阅读全文
posted @ 2013-09-03 02:30 Alfa 阅读(2901) 评论(0) 推荐(1) 编辑

摘要: 摘 自: http://www.hao5191.cn/a/chengxukaifa/c_/20130109/115819.htmlusing System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Net; using System.IO; using System.CodeDom.Compiler; using System.Reflection; using System.Web.Services.Description; using System.Xml.Se 阅读全文
posted @ 2013-09-03 01:41 Alfa 阅读(661) 评论(0) 推荐(1) 编辑