随笔分类 -  c#

上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页
摘要:C# 支持多线程并行执行程序 1.一个程序由一个单线程开始,该单线程由CLR和操作系统创建而成,并具有多线程创建额外线程的功能. 2.创建线程的方法 2.1 通过Thread类来创建线程. ThreadStart委托创建线程 ThreadStart ts=new ThreadStart(Run);//创建指定线程从哪里(哪个方法)开始的委托 Thread th=new Thread(t... 阅读全文
posted @ 2019-06-25 17:13 enych 阅读(574) 评论(0) 推荐(0)
摘要:C#创建目录 var strpatj = HttpRuntime.AppDomainAppPath; if (!Directory.Exists(strpatj+"\\temp")) Directory.CreateDirectory(strpatj + "\\temp"); C#在目录下创建文件 StreamReader sr = new StreamReader(filestrem, Sys... 阅读全文
posted @ 2019-06-25 17:10 enych 阅读(11432) 评论(0) 推荐(1)
摘要:using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; /// /// 用于取得一个文本文件的编码方式(Encoding)。 /// publ... 阅读全文
posted @ 2019-04-05 22:04 enych 阅读(5479) 评论(0) 推荐(1)
摘要:#region 发送post请求 public static string Post(string str) { string result = ""; HttpWebRequest req = (HttpWebRequest)WebRequest.Create("http://localhost:8563/... 阅读全文
posted @ 2019-04-05 21:58 enych 阅读(20960) 评论(1) 推荐(0)
该文被密码保护。
posted @ 2019-04-05 21:50 enych 阅读(0) 评论(0) 推荐(0)
摘要:不知道 画笔 的像素是多少, 设置的是 画线的长度为1; 画笔的宽度 为1 阅读全文
posted @ 2019-03-29 11:52 enych 阅读(4956) 评论(1) 推荐(0)
该文被密码保护。
posted @ 2019-03-26 10:56 enych 阅读(4) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2019-03-22 18:00 enych 阅读(8) 评论(0) 推荐(0)
摘要://指定数据前移 ssid private void button3_Click(object sender, EventArgs e) { StringBuilder sb = new StringBuilder(); string str = "686B666B686B666B706B5D9BA 阅读全文
posted @ 2019-03-22 10:43 enych 阅读(994) 评论(0) 推荐(0)
摘要:ctr+shift+p 输入 configure language 进 en更改为zh-cn , 重启vscode即可 , 如果还不行,就安装插件 阅读全文
posted @ 2019-03-18 08:15 enych 阅读(194) 评论(0) 推荐(0)
摘要:配置文件内容为 <?xml version="1.0" encoding="utf-8" ?> <configuration> </configuration> 在配置节点中添加connectionStrings节点 <?xml version="1.0" encoding="utf-8" ?> < 阅读全文
posted @ 2019-03-18 08:11 enych 阅读(2397) 评论(0) 推荐(0)
摘要:如果你想在窗体上进行绘画。通常会使用以下方法. 方法1,利用控件或窗体的paint事件中的painEventArgs private void form1_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics;//创建画板, } 方法2直接重载控件或窗体的OnPaint方法 protected override void... 阅读全文
posted @ 2019-03-16 22:03 enych 阅读(22628) 评论(0) 推荐(0)
摘要:StringBuilder sb = new StringBuilder(); ServiceController[] services = ServiceController.GetServices(); //需要添加引用程序程序集Serviceprocess foreach (ServiceController sController i... 阅读全文
posted @ 2019-03-16 18:56 enych 阅读(252) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2019-03-12 12:05 enych 阅读(1088) 评论(0) 推荐(0)
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ABCDEFG { public class 依赖注入 { public void test() ... 阅读全文
posted @ 2019-03-09 11:57 enych 阅读(397) 评论(0) 推荐(0)
摘要:public List test(List EntityList) where T : class { return EntityList; } 阅读全文
posted @ 2019-03-08 17:51 enych 阅读(3453) 评论(0) 推荐(0)
摘要:private void button1_Click(object sender, EventArgs e) { //需要的数据是 销售订单, 客户名称,项目名称 List<DateTime> dateTimes = new List<DateTime>(); for (int i = 0; i < 阅读全文
posted @ 2019-03-08 08:11 enych 阅读(946) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2019-03-06 16:02 enych 阅读(9) 评论(0) 推荐(0)
摘要:string type = Request["type"]; //值为null; //?type= 值为""; //?type=12 值为"12" string type = Request["type"]; if (type!="A" && type!="B") { return HttpNotF... 阅读全文
posted @ 2019-03-04 11:58 enych 阅读(929) 评论(0) 推荐(0)
摘要:string str = "2019-01"; //name: "2019-01月" str = str.Substring(str.Length - 2, 2); //把第一个0替换为空 var t = Convert.ToInt32(str).ToString(); 阅读全文
posted @ 2019-03-02 17:39 enych 阅读(1055) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页