文章分类 -  c#

摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--usingSystem;usingSystem.Collections.Generic;usingSystem.Threading;namespacepLib{publicclassMSQueue&l... 阅读全文
posted @ 2010-07-01 14:37 风叙 阅读(1003) 评论(0) 推荐(0)
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--///<summary>///GB2312的拼音算法,不支持多音字///</summary>publicclassGB2Alpha{publicstaticvoidGetAlp... 阅读全文
posted @ 2010-07-01 12:35 风叙 阅读(270) 评论(0) 推荐(0)
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--///<summary>///微软桌面操作系统版本///</summary>publicenumOSVersion{UnKnown=0,Windows95=1,Windows9... 阅读全文
posted @ 2010-07-01 12:25 风叙 阅读(157) 评论(0) 推荐(0)
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--///<summary>///<code>///byte数组///本类实例和socket配对///仅用于储存网络缓存数据///</code>///</summ... 阅读全文
posted @ 2010-07-01 12:23 风叙 阅读(256) 评论(0) 推荐(0)
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--publicstaticboolIsNumber(stringinString){if(string.IsNullOrEmpty(inString))returnfalse;Regexregex=ne... 阅读全文
posted @ 2010-07-01 12:21 风叙 阅读(124) 评论(0) 推荐(0)
摘要:/// <summary> /// 获取当前socket连接所属网卡的MAC地址 /// </summary> /// <returns></returns> public static string GetNetCardMacAddress() { System.Management.ManagementClass mc; System.M... 阅读全文
posted @ 2010-07-01 12:19 风叙 阅读(607) 评论(0) 推荐(0)
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--///<summary>///char[]转换为string///</summary>publicstaticstringCharsToStr(char[]buff){stri... 阅读全文
posted @ 2010-07-01 12:18 风叙 阅读(130) 评论(0) 推荐(0)
摘要:c#中要让struct转换为byte[],首先要在struct申明中说明struct的结构,如下:代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--///<summary>///数据包内容的头信息///</summary>[... 阅读全文
posted @ 2010-07-01 12:16 风叙 阅读(6791) 评论(0) 推荐(2)
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--///<summary>///用于播放音乐///</summary>internalclassHelpers{[Flags]publicenumPlaySoundFlags:i... 阅读全文
posted @ 2010-07-01 11:56 风叙 阅读(166) 评论(0) 推荐(0)
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--//数字转换成大写金额//例如:(newMoney(200)).ToString()=="贰佰元"namespaceSkyiv.Util{usingSystem.Text;classTest{stat... 阅读全文
posted @ 2010-07-01 11:50 风叙 阅读(158) 评论(0) 推荐(0)
摘要:UTF8[\x01-\x7f]|[\xc0-\xdf][\x80-\xbf]|[\xe0-\xef][\x80-\xbf]{2}|[\xf0-\xff][\x80-\xbf]{3}UTF16[\x00-\xd7][\xe0-\xff]|[\xd8-\xdf][\x00-\xff]{2}JIS[\x20-\x7e]|[\x21-\x5f]|[\x21-\x7e]{2}SJIS[\x20-\x7e]|... 阅读全文
posted @ 2010-07-01 11:47 风叙 阅读(1165) 评论(0) 推荐(0)
摘要:MD5加密代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--usingSystem.Security.Cryptography;usingSystem.Text;#region加密密码,UserMd5(stringstr1)protectedstri... 阅读全文
posted @ 2010-07-01 11:37 风叙 阅读(313) 评论(0) 推荐(0)
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--usingSystem;usingSystem.Security.Permissions;//权限判断usingMicrosoft.Win32;//操作注册表//[assembly:RegistryP... 阅读全文
posted @ 2010-07-01 11:23 风叙 阅读(248) 评论(0) 推荐(0)
摘要:一,哈希表(Hashtable)简述 在.NET Framework中,Hashtable是System.Collections命名空间提供的一个容器,用于处理和表现类似key/value的键值对,其中key通常可用来快速查找,同时key是区分大小写;value用于存储对应于key的值。Hashtable中key/value键值对均为object类型,所以Hashtable可以支持任何类型的key... 阅读全文
posted @ 2010-07-01 11:22 风叙 阅读(129) 评论(0) 推荐(0)