上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 22 下一页

2019年10月11日

char[] byte[] string

摘要: C# byte 和 char 可以认为是等价的。但是在文本显示的时候有差异。 char 占两个字节,unicode字符 1、内存转换: char转化为byte: byte转换为char: 2、字符串转换 char[]转化为byte[]: byte[]转化为char[]: string类型转成byte 阅读全文

posted @ 2019-10-11 19:40 jshchg 阅读(357) 评论(0) 推荐(0) 编辑

C# 正则表达式

摘要: 正则表达式手册: http://tool.oschina.net/uploads/apidocs/jquery/regexp.html 阅读全文

posted @ 2019-10-11 16:14 jshchg 阅读(237) 评论(0) 推荐(0) 编辑

2019年9月24日

C#格式化字符串使用

摘要: 1 前言 如果你熟悉Microsoft Foundation Classes(MFC)的CString,Windows Template Library(WTL)的CString或者Standard Template Library(STL)的字符串类,那么你对String.Format方法肯定很熟 阅读全文

posted @ 2019-09-24 17:49 jshchg 阅读(6203) 评论(0) 推荐(1) 编辑

2019年9月23日

C# 3.0 扩展方法&接口

摘要: namespace ExtensionInterfaceMethod { class Program { static void Main(string[] args) { //使用接口变量来调用扩展方法 IBasicInterface bii = new BasicImplement(); bii 阅读全文

posted @ 2019-09-23 16:13 jshchg 阅读(188) 评论(0) 推荐(0) 编辑

C#中字典集合HashTable、Dictionary、ConcurrentDictionary三者区别

摘要: C#中HashTable、Dictionary、ConcurrentDictionar三者都表示键/值对的集合,但是到底有什么区别,下面详细介绍: 一、HashTable HashTable表示键/值对的集合。在.NET Framework中,Hashtable是System.Collections 阅读全文

posted @ 2019-09-23 15:27 jshchg 阅读(344) 评论(0) 推荐(0) 编辑

实现自定义集合的可枚举类型(IEnumerable)和枚举数(IEnumerator )

摘要: 下面的代码示例演示如何实现自定义集合的 IEnumerable 和 IEnumerator 接口: 可枚举类型 → 实现IEnumerable接口,可以不需要直接实现这个接口,但必须有个GetEnumerator方法,返回值类型必须为IEnumerator类型,也就是第四点最后一段代码中接口注释的那 阅读全文

posted @ 2019-09-23 14:17 jshchg 阅读(336) 评论(0) 推荐(0) 编辑

集合(Collection)类

摘要: 集合(Collection)类是专门用于数据存储和检索的类。这些类提供了对栈(stack)、队列(queue)、列表(list)和哈希表(hash table)的支持。大多数集合类实现了相同的接口。 集合(Collection)类服务于不同的目的,如为元素动态分配内存,基于索引访问列表项等等。这些类 阅读全文

posted @ 2019-09-23 11:24 jshchg 阅读(1440) 评论(0) 推荐(0) 编辑

2019年9月12日

Monitor 实现阻塞队列 + 生产消费者实例

摘要: 转载至 https://www.codeproject.com/Articles/28785/Thread-synchronization-Wait-and-Pulse-demystified 阅读全文

posted @ 2019-09-12 16:27 jshchg 阅读(391) 评论(0) 推荐(0) 编辑

C#多线程代码示例

摘要: using System; using System.Threading; namespace MultiThreadDemo { class Program { public static void threadfunc() { try { Console.WriteLine("Child thr 阅读全文

posted @ 2019-09-12 15:46 jshchg 阅读(829) 评论(0) 推荐(0) 编辑

2017年12月25日

Windows下DLL查找顺序

摘要: http://m.blog.csdn.net/hanford/article/details/53581977 阅读全文

posted @ 2017-12-25 22:53 jshchg 阅读(172) 评论(0) 推荐(0) 编辑

上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 22 下一页

导航