C#Winform 实现ListBox中项的拖拽

private void lstRead_MouseDown(object sender, MouseEventArgs e) { if (this.lstRead.SelectedItem == null) { return; } //开始拖放操作,Dr …… 阅读全文

C# Access数据库操作类

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data;using System.Data.OleDb;using System.Collections;using System.Configuration;using System.IO; …… 阅读全文

C#测试网络连接测试

直接上代码,你们懂得 private void checkNetConnect() { string url = "www.baidu.com"; string state = ""; Ping ping = new Ping(); try { ... …… 阅读全文

C#创建Windows凭据

创建Windows凭据,直接上代码备注,这里需要注意一点:如果是xp系统的话需要使用(IP\用户名)作为用户名,而win7和win10则可直接使用(用户名)作为用户名,当然也支持(IP\用户名)作为用户名。using System;using System.Collections.Generic;using System.Text;using System.Runtime.Inte... …… 阅读全文

C#中数据类型的基本了解

bool -> System.Boolean (布尔型,其值为 true 或者 false)byte -> System.Byte (字节型,占 1 字节,表示 8 位正整数,范围 0 ~ 255)sbyte -> System.SByte (带符号字节型,占 1 字节,表示 8 位整数,范围 -128 ~ 127)char -> System.Char (字符型,占有两个 …… 阅读全文

.Net中并行计算的了解

沿用微软的写法,System.Threading.Tasks.::.Parallel类,提供对并行循环和区域的支持。 我们会用到的方法有For,ForEach,Invoke。  一、简单使用  首先我们初始化一个List用于循环,这里我们循环10次。(后面的代码都会按这个标准进行循环) Program.Data=newListint>(); …… 阅读全文