C#
leeyushi
这个作者很懒,什么都没留下…
展开
-
C#完全透明的按钮可与背景完美结合
原创 2018-02-08 14:15:33 · 1304 阅读 · 0 评论 -
C#效验身份证号是否正确
18位号码: private static bool CheckIDCard18(string Id) { long n = 0; if (long.TryParse(Id.Remove(17), out n) == false || n < Math.Pow(10, 16) || long.TryParse...转载 2018-08-12 15:03:18 · 4132 阅读 · 0 评论 -
C#判断文件是否占用
[DllImport("kernel32.dll")] public static extern IntPtr _lopen(string lpPathName, int iReadWrite); [DllImport("kernel32.dll")] public static extern bool CloseHandle(IntPtr...转载 2018-06-01 21:33:48 · 878 阅读 · 0 评论 -
C#禁止程序多开
bool createdNew; //返回是否赋予了使用线程的互斥体初始所属权 System.Threading.Mutex instance = new System.Threading.Mutex(true, "MutexName", out createdNew); //同步基元变量 ...转载 2018-06-22 20:02:49 · 571 阅读 · 0 评论 -
C#窗体控件下调试输出内容
1,在视图菜单中,点击输出2,然后再代码中Console.WriteLine("提示信息"); //就可以输出了原创 2018-05-17 20:19:24 · 2165 阅读 · 0 评论 -
C#将文件流转换成图片
Stream stream = null; response = (HttpWebResponse)request.GetResponse(); stream = response.GetResponseStream(); Image img = Image.FromStream(stream);...原创 2018-05-04 09:14:16 · 8899 阅读 · 0 评论 -
C#Post常用功能
在某些网站没有会发生"远程服务器返回错误: (403) 已禁止。"错误则要加上request.userAgent属性 HttpWebRequest request = null; //提交HttpWebResponse response = null; //返回Request.Method = "POST";//数据提交方式request.Hos...原创 2018-05-09 21:28:15 · 4362 阅读 · 0 评论 -
C#Selenium常用语法功能
环境搭建:http://www.cnblogs.com/NorthAlan/p/5155915.html在项目名\引用\右击\管理NuGet程序包\搜索Selenium\安装以下:Selenium.WebDriverSelenium.Support可选:Selenium.Firefox.WebDriver //火狐浏览器驱动Selenium.Chrome.WebD...原创 2018-05-09 19:18:41 · 3062 阅读 · 0 评论 -
C#获取字符串字节长度
System.Text.Encoding.Default.GetByteCount("清 和田玉摆件").ToString();原创 2018-05-01 00:24:30 · 1045 阅读 · 0 评论 -
VisualStudio返回上一次浏览位置
工具/选项/环境/键盘 搜索"向前" 找到视图.向前导航 然后自定义指定快捷键 点确定 搜索"向后" 找到视图.向后导航 然后自定义指定快捷键 点确定 ...原创 2018-01-23 00:40:22 · 19179 阅读 · 0 评论