随笔分类 - C#
摘要:public class UploadFileService { private readonly CacheService _cache; public UploadFileService(CacheService cache) { _cache = cache; } /// <summary> 
        阅读全文
                
摘要:class MyInit { ALiPayHelper aLiPayHelper = new ALiPayHelper(); HttpClientRequest request = new HttpClientRequest(); public void Init() { Mapper.Initia...
        阅读全文
                
摘要:/// <summary> /// WPS API接口调用 /// </summary> /// <param name="requestMethod">请求方式(get,post,put,delete)</param> /// <param name="requestUri">接口uri</par
        阅读全文
                
摘要:using System; using System.Net.Http; using System.Threading; using System.Threading.Tasks; namespace CookBook { class Program { static void Main(string[] args) { ...
        阅读全文
                
摘要:using System;using System.Collections.Generic;using System.Data.SqlClient;using System.Reflection;using System.Text;using System.Text.RegularExpressio...
        阅读全文
                
摘要:/// /// post方法 /// /// /// /// public static string postJson(string serverUrl, string reqJson) {...
        阅读全文
                
摘要:using System;namespace Bank{ public class Pay { public string Send(Func funcDo, T context, Bank.User model, Func funcLog, Func funcDoOthe...
        阅读全文
                
摘要:private System.Threading.ReaderWriterLock rwl; public DataBase() { rwl = new System.Threading.ReaderWriterLock(); } ...
        阅读全文
                
摘要:本文转载自 http://www.cnblogs.com/icyJ/p/Parallel_TaskFactory.html很厉害的帖子Barrier _bar;int _maxLength = 20, _maxChannel = 2;//同时最多2条通道,每条通道最多20个数据bool _isCan...
        阅读全文
                
摘要:js中escape编码在后台+会被替换成空格可以使用encodeURIComponent解决
        阅读全文
                
摘要:ASP.NET版Memcached监控工具 合计: 0 3 0 5 0 6 0 9 0 7 0 2 dc.aspxusing...
        阅读全文
                
摘要:HttpFileCollection hfc = Request.Files; if (hfc.Count > 0) { FileStream fs; Stream _stream; int btLen = 10000; byte[] _byte = new byte[btLen]; int len, ysc = 0; string _root = Server.MapPath("~"); HttpPostedFi...
        阅读全文
                
摘要://using Newtonsoft.Json; StringBuilder sb = new StringBuilder(); string str = "[{ID:'1',Name:'zhangsan',Other:[{Age:'111'}]}]"; JavaScriptArray javascript = (JavaScriptArray)JavaScriptConvert.DeserializeObject(str); if (javascript.Count > 0) { JavaScript...
        阅读全文
                
摘要:using System;using System.Collections.Generic;using System.Web;using System.Drawing.Imaging;using System.Drawing;/// ///MakeThum 的摘要说明/// public class MakeThum{ public MakeThum() { // //TODO: 在此处添加构造函数逻辑 // } /// /// 生成缩略图//带压缩图片不压缩22k压缩2k /// /// 原始路径 ...
        阅读全文
                
摘要:public static string getUControlHtml(string controlName) { StringBuilder build = new StringBuilder(); HtmlTextWriter htmlWriter = new HtmlTextWriter(new StringWriter(build)); UserControl uc = new UserControl(); Control ctrl = uc.LoadControl(controlName + ".ascx");/...
        阅读全文
                
摘要:CommonJsonModelAnalyzer.csusing System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConvertJosn{ public class CommonJsonModelAnalyzer { protected string _GetKey(string rawjson) { if (string.IsNullOrEmpty(rawjson)) return...
        阅读全文
                
摘要:public delegate void MyDelegate(object sender, EventArgs e); protected void Page_Load(object sender, EventArgs e) { MyDelegate md = new MyDelegate(Button1_Click); //md(Button1, null); md(Button1, new System.EventArgs()); //MyDelegate md1 = new MyDelegate(DropDownLis...
        阅读全文
                
摘要:protected StringBuilder sb = new StringBuilder(); protected void Page_Load(object sender, EventArgs e) { string str = QConnectSDK.CustomWebRequest.getResponse("/", QConnectSDK.Method.GET, null); Regex reg = new Regex("<img([^\\/>src]+)src=\"([^\"]+)\"([^\\/]*)\\/?
        阅读全文
                
                    
                
浙公网安备 33010602011771号