C#基础概念二十五问
摘要:http://www.cnblogs.com/reonlyrun/archive/2007/04/05/CSharp_25_Question.html
阅读全文
posted @
2009-05-21 17:13
一只鱼先生
阅读(164)
推荐(0)
C#调用VC的DLL的接口函数参数类型转换一览表
摘要:handle---------IntPtrhwnd-----------IntPtrchar *----------stringint * -----------ref intint &-----------ref intvoid *----------IntPtrunsigned char *-----ref byteStruct需要在C#里重新定义一个StructCallBack回调函...
阅读全文
posted @
2009-03-27 09:45
一只鱼先生
阅读(1924)
推荐(0)
C#中byte[]与string的转换
摘要:1、System.Text.UnicodeEncoding converter = new System.Text.UnicodeEncoding();byte[] inputBytes =converter.GetBytes(inputString);string inputString = converter.GetString(inputBytes);2、string inputString...
阅读全文
posted @
2009-03-09 15:35
一只鱼先生
阅读(303)
推荐(0)
关于数组
摘要:剔除单个数组中的重复项 ArrayList list = new ArrayList(); list.Add("C#"); list.Add("一只鱼先生"); list.Add("一只鱼先生"); list.Add("VS2005"); list.Add("C#...
阅读全文
posted @
2009-01-16 09:08
一只鱼先生
阅读(156)
推荐(0)
类型转型的三种做法
摘要:(1) 强制转型:(int)变量名称 (2) int.Parse(字符串变量名称) (3) Convert.To类型(变量名称) 第 (1) 种「强制转型 (casting)」: * 浮点数会做无条件舍去,失去精确度 * 可处理 object 转 int,但遇到 object 为 null 时会产生 error * 某些情况下,如 object 转型成 int,有时正常,但有时会无故发生 e...
阅读全文
posted @
2008-12-29 16:14
一只鱼先生
阅读(211)
推荐(0)
获得随机文件名
摘要:/// /// 获得随机文件名 /// /// /// public static string GetRandomFileName(string filename) { string[] files = filename.Split('.'); string exfilename = "." + files....
阅读全文
posted @
2008-11-20 13:48
一只鱼先生
阅读(211)
推荐(1)