随笔分类 -  c#

vsto 检测是否在编辑状态或者光标闪动
摘要:object m = Type.Missing; const int MENU_ITEM_TYPE = 1; const int NEW_MENU = 18; CommandBarControl oNewMenu = ExcelGlobals.Application.CommandBars["Wor 阅读全文

posted @ 2019-11-25 09:37 GIS-MAN 阅读(319) 评论(0) 推荐(0)

c# dataTable 排序
摘要:if(columnBindingName== "modifyfrequency") { DataTable dt = this.dgvMyIndex.DataSource as DataTable; EnumerableRowCollection<DataRow> dayquery = from order in dt.AsEnumerable() where order.Field<string 阅读全文

posted @ 2019-11-01 09:40 GIS-MAN 阅读(439) 评论(0) 推荐(0)

asp.net mvc 上传图片 摘自mvc 高级编程第311页
摘要:Image UploadsI am going to complete the SportsStore user experience with something a little more sophisticated: I will add the ability for theadminist... 阅读全文

posted @ 2016-01-09 16:25 GIS-MAN 阅读(279) 评论(0) 推荐(0)

async await ,一步一步试用
摘要:public class downClass1 { public IStorageFile pResultStorageFile; public async Task<IStorageFile> down() { string CountriesFile = "fruit.xml"; StorageFolder InstallationFolder =Windows.ApplicationModel.Package.Current.InstalledLocation; ... 阅读全文

posted @ 2012-09-05 16:49 GIS-MAN 阅读(356) 评论(0) 推荐(0)

两数组是否“相等”?。NET 下
摘要:http://www.codesky.net/article/200912/124632.html在.NET 4.0中我们将看到数组方面有很大的改进,本文将给大家讨论的是.NET 4.0数组的新增功能,希望对大家用好.NET 4.0数组有所帮助。1 两数组是否“相等”?在实际开发中,有时我们需要比对两个数组是否拥有一致的元素,例如,以下两个数组由于拥有相同的元素,因此被认为是相等的:int[]arr1=newint[] { 1,2,3,4 }; int[]arr2=newint[] { 1,2,3,4 };在.NET早期版本中,要实现上述数组比对功能,必须自己动手编写一个函数,在其内部使用循环 阅读全文

posted @ 2012-09-05 14:47 GIS-MAN 阅读(1046) 评论(1) 推荐(0)

BitArray
摘要:using System; using System.Collections; public class SamplesBitArray { public static void Main() { // Creates and initializes several BitArrays. BitArray myBA1 = new BitArray( 5 ); BitArray myBA2 = new BitArray( 5, false ); byte[] myBytes = new byte[5] { 1, 2, 3, 4, 5 }... 阅读全文

posted @ 2012-09-05 14:43 GIS-MAN 阅读(264) 评论(0) 推荐(0)

asynChronous delegaTes 异步委托
摘要:static int TakesAWhile(int data, int ms) { Console.WriteLine("TakesAWhile started"); Thread.Sleep(ms); Console.WriteLine("TakesAWhile completed"); return ++data; } ... 阅读全文

posted @ 2012-07-12 16:56 GIS-MAN 阅读(148) 评论(0) 推荐(0)

线程不安全
摘要:class ThreadUnsafe { static int _val1 = 1, _val2 = 1; static void Go() { if (_val2 != 0) Console.WriteLine (_val1 / _val2); _val2 = 0; } }///方法的定义和分配的内存地... 阅读全文

posted @ 2012-07-12 16:55 GIS-MAN 阅读(171) 评论(0) 推荐(0)

linq TO XML 基础
摘要:这样写可以用在linq 查询里面 阅读全文

posted @ 2012-07-10 17:09 GIS-MAN 阅读(131) 评论(0) 推荐(0)

linq 简单操作符
摘要: 阅读全文

posted @ 2012-07-10 15:50 GIS-MAN 阅读(81) 评论(0) 推荐(0)

linq 基础
摘要: 阅读全文

posted @ 2012-07-10 15:42 GIS-MAN 阅读(108) 评论(0) 推荐(0)

导航