摘要:
public class AesHelper { /// <summary> /// AES加密 /// </summary> /// <param name="plainText">声明用于保存的字符串</param> /// <param name="Key">设置对称算法的密钥。</param 阅读全文
摘要:
定义的锁对象应该是 私有的,静态的,只读的,引用类型的对象,这样可以防止外部改变锁对象 private static readonly object Lock = new object(); 阅读全文
摘要:
<system.webServer> <httpProtocol> <customHeaders> <add name="Access-Control-Allow-Methods" value="OPTIONS,POST,GET"/> <add name="Access-Control-Allow- 阅读全文
摘要:
public static class XSSFWorkbook_Excel { /// <summary> /// GetExcel /// </summary> /// <param name="list">结果结合</param> /// <param name="parms_header"> 阅读全文
摘要:
调用异步方法前 HttpContext context = System.Web.HttpContext.Current; HttpRuntime.Cache.Insert("context", context); 异步方法里 HttpContext context = HttpContext.Cu 阅读全文
摘要:
using System; using System.Collections.Generic; using System.Linq; using System.Windows.Forms; using System.Threading; namespace WindowsFormsApplicati 阅读全文
摘要:
winform: protected override CreateParams CreateParams { get { const int WS_EX_APPWINDOW = 0x40000; const int WS_EX_TOOLWINDOW = 0x80; CreateParams cp 阅读全文
摘要:
看到.net webapi中有[FromUri]来接收参数 可以将自动参数转换成字段属性的类型 baidu 了许多文章 都在自己造轮子 突然发下微软提供了这个方法 Convert.ChangeType() public static readonly BackArgs _args = new Bac 阅读全文
摘要:
IsoDateTimeConverter _IsoDateTimeConverter = new IsoDateTimeConverter() { DateTimeFormat = "yyyy-MM-dd HH:mm:ss" }; var json = JsonConvert.SerializeOb 阅读全文
摘要:
var result = new HttpResponseMessage { Content = new StringContent(JsonConvert.SerializeObject(dto2), Encoding.GetEncoding("UTF-8"), "application/json 阅读全文