08 2016 档案

摘要:string sourcePath = @"D:\GL\20160826141915999999.txt"; for (int i = 0; i < 10; i++) { Guid guid = Guid.NewGuid(); string str = DateTime.Now.ToString(" 阅读全文
posted @ 2016-08-26 15:09 FredGrit 阅读(4902) 评论(0) 推荐(0) 编辑
摘要:1取汉字汉语拼音首字母: private static string GetFirstLetterOfChineseString(string CnChar) { long iCnChar; byte[] ZW = System.Text.Encoding.Default.GetBytes(CnCh 阅读全文
posted @ 2016-08-23 14:29 FredGrit 阅读(1498) 评论(0) 推荐(0) 编辑
摘要:Task<string> task = Task.Factory.StartNew(() => "The world is very fair and everything depend on myself!"); Console.WriteLine(task.Result); Task<long> 阅读全文
posted @ 2016-08-17 23:07 FredGrit 阅读(151) 评论(0) 推荐(0) 编辑
摘要:1. Task task = new Task(() => { MultiplyMethod(a, b); }); task.Start(); 2. Task task = Task.Run(() => { MultiplyMethod(a, b); }); 3. Task task = Task. 阅读全文
posted @ 2016-08-17 22:54 FredGrit 阅读(2928) 评论(0) 推荐(0) 编辑
摘要:class Program { static void Main(string[] args) { (new Program()).MyMethodAsync(); Console.ReadLine(); } public async Task MyMethodAsync() { Task<int> 阅读全文
posted @ 2016-08-17 22:31 FredGrit 阅读(127) 评论(0) 推荐(0) 编辑
摘要:static int BinarySearch(int[] arr,int key,int low,int high) { low = 0;high = arr.Length - 1; while(low<=high) { int mid = (low + high) / 2; if (arr[mi 阅读全文
posted @ 2016-08-16 21:13 FredGrit 阅读(536) 评论(0) 推荐(0) 编辑
摘要:1.Task.Run(); static void Main(string[] args) { long a = 9876545678, b = 987654567892; Task task = Task.Run(() => { Add(a, b); }); Console.ReadLine(); 阅读全文
posted @ 2016-08-15 22:43 FredGrit 阅读(185) 评论(0) 推荐(0) 编辑
摘要:private void btnExport_Click(object sender, RoutedEventArgs e) { System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch(); sw.Start(); dg. 阅读全文
posted @ 2016-08-15 22:22 FredGrit 阅读(710) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示