this.治疗完毕

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

文章分类 -  C#

摘要:属性/方法名: 说明: [基本属性] URL:String; 指定媒体位置,本机或网络地址 uiMode:String; 播放器界面模式,可为Full, Mini, None, Invisible playState:integer; 播放状态,1=停止,2=暂停,3=播放,6=正在缓冲,9=正在连接,10=准备就绪 ,8为完成播放 enableContextMenu... 阅读全文
posted @ 2018-06-06 15:45 this.治疗完毕 阅读(305) 评论(0) 推荐(0)

摘要://设置可视化效果,参数value设为4即可 public void SetCurrentEffectPreset(int value) { WindowsIdentity identiry = WindowsIdentity.GetCurrent(); String path = String.Format(@"{... 阅读全文
posted @ 2018-06-05 18:13 this.治疗完毕 阅读(199) 评论(0) 推荐(0)

摘要://1.获取模块的完整路径。 string path1 = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName; //2.获取和设置当前目录(该进程从中启动的目录)的完全限定目录 string path2 = System.Environment.CurrentDirectory; //3.获取... 阅读全文
posted @ 2018-06-02 22:52 this.治疗完毕 阅读(128) 评论(0) 推荐(0)

摘要:using System; using System.Collections; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.IO; using System.Reflection; using System.Runtime.Serialization.... 阅读全文
posted @ 2018-05-31 19:52 this.治疗完毕 阅读(134) 评论(0) 推荐(0)

摘要:1.添加名为SqlHelper的类,将以上代码复制进去。 2.添加引用 3.添加链接字符串 打开App.config增加以下代码: 4.数据库连接以及增删改查操作 5.相关知识 DataSet类详解 https://msdn.microsoft.com/zh-cn/library/system.da 阅读全文
posted @ 2018-05-31 19:49 this.治疗完毕 阅读(1738) 评论(0) 推荐(0)

摘要:/// /// Computer Information /// public class ComputerHelper { public string CpuID; public string MacAddress; public string DiskID; public string IpA... 阅读全文
posted @ 2018-05-31 19:37 this.治疗完毕 阅读(110) 评论(0) 推荐(0)

摘要:DateTime dt = mc.SelectionStart; c = new EcanChineseCalendar(dt); StringBuilder dayInfo = new StringBuilder(); dayInfo.Append("阳历:" + c.DateString + " 阅读全文
posted @ 2018-05-31 19:25 this.治疗完毕 阅读(257) 评论(0) 推荐(0)

摘要:Array类 a) IEumerable接口是由foreach语句用于迭代数组的接口。 b) ICollection接口派生于IEumerable接口,这个接口主要用于确定集合中的元素个数,或用于同步。 c) IList接口派生于ICollection接口,Array类实现IList接口的主要原因是 阅读全文
posted @ 2018-05-31 19:22 this.治疗完毕 阅读(467) 评论(0) 推荐(0)

摘要:using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.IO; using System.Net; using System.Text; using System.Runtime.Serialization; using Sy... 阅读全文
posted @ 2018-05-31 19:17 this.治疗完毕 阅读(977) 评论(0) 推荐(0)

摘要:string str = "LEdddsE"; string[] strs = new string[str.Length]; for (int i = 0; i < str.Length; i++) { strs[i] = str.Substring(i, 1); ... 阅读全文
posted @ 2018-05-31 19:10 this.治疗完毕 阅读(158) 评论(0) 推荐(0)

摘要:FileStream fs = new FileStream("这里是你的txt路径",FileMode.Open,FileAccess.ReadWrite); StreamReader sr = new StreamReader(fs,Encoding.Default); string content = sr.ReadToEnd();//这个就是文本内容 content = content.... 阅读全文
posted @ 2018-05-31 19:07 this.治疗完毕 阅读(2182) 评论(0) 推荐(0)

摘要://1.单个字符逐一检查 public bool IsNumeric(string str) { if (str==null || str.Length==0) return false; foreach(char c in str) { if (!Char.IsNumber(c)) { return false; ... 阅读全文
posted @ 2018-05-31 19:05 this.治疗完毕 阅读(110) 评论(0) 推荐(0)

摘要:string str=" aaa "; str=str.Trim() 去字符串首尾空格的函数 strt=str.TrimEnd() 去掉字符串尾空格 str=str.TrimStart() 去掉字符串首空格 阅读全文
posted @ 2018-05-31 19:00 this.治疗完毕 阅读(429) 评论(0) 推荐(0)

摘要://对几千万的TXT文本数据进行去重处理,查找其中重复的数据,并移除。尝试了各种方法,下属方法是目前尝试到最快的方法。以下代码将重复和不重复数据进行分文件存放,提升效率的关键是用到了HashSet。 TextReader reader = File.OpenText(m_dataFilePath); string[] files =... 阅读全文
posted @ 2018-05-31 18:56 this.治疗完毕 阅读(3102) 评论(0) 推荐(0)

摘要:using System; using System.Text; /// 可以随机生成一个长度为2的十六进制字节数组, /// 使用GetString ()方法对其进行解码就可以得到汉字字符了。 /// 不过对于生成中文汉字验证码来说,因为第15区也就是AF区以前都没有汉字, /// 只有少量符号,汉字都从第16区B0开始,并且从区位D7开始以后的汉字都是和很难见到的繁杂汉字, /// 所以... 阅读全文
posted @ 2018-05-31 18:41 this.治疗完毕 阅读(548) 评论(0) 推荐(0)

摘要:public static object[] CreateRegionCode(int strlength, bool isRandomCount = false) { if (isRandomCount) { Random random = new Random(); strlength = random.Next(1, strlen... 阅读全文
posted @ 2018-05-31 18:40 this.治疗完毕 阅读(2730) 评论(0) 推荐(0)

摘要:汉字区位码表 区位码、国标码与机内码的转换关系 1)区位码先转换成十六进制数表示 (2)(区位码的十六进制表示)+2020H=国标码; (3)国标码+8080H=机内码 举例:以汉字“大”为例,“大”字的区内码为2083 1、区号为20,位号为83 2、将区位号2083转换为十六进制表示为1453H 阅读全文
posted @ 2018-05-31 18:36 this.治疗完毕 阅读(214) 评论(0) 推荐(0)

摘要:Random类默认的无参构造函数可以根据当前系统时钟为种子,进行一系列算法得出要求范围内的伪随机数 这种随机数可以达到一些要求较低的目标,但是如果在高并发的情况下,Random类所取到的系统时钟种子接近甚至完全一样,就很有可能出现重复,这里用循环来举例 这个例子会得到10个相同的随机数,应循环完成的 阅读全文
posted @ 2018-05-31 18:35 this.治疗完毕 阅读(325) 评论(0) 推荐(0)

摘要:private void button1_Click(object sender, EventArgs e) { //定义一个变量 int lineCount = 0; //文件路径 string path = @"D:\SQL.txt"; try { using(StreamReader sr = new StreamReader(path)) //循环读取 ... 阅读全文
posted @ 2018-05-31 18:27 this.治疗完毕 阅读(1870) 评论(0) 推荐(0)

摘要:textBox1.GetLineFromCharIndex(textBox1.TextLength)+1 阅读全文
posted @ 2018-05-31 18:23 this.治疗完毕 阅读(1847) 评论(0) 推荐(0)