摘要: 让自己定义的类型可以支持foreach需要类继承:IEnumeratable还要有自己的迭代器(IEnumerator)示例如下: public class Test { public class User { public string Us... 阅读全文
posted @ 2015-08-14 15:55 南风叶 阅读(375) 评论(0) 推荐(0) 编辑
摘要: 在网上找了很久没找到讲这个图标的,自己基础差.只能自己看着写,作为备忘录如上图所示,Equals前面的图标不用讲,方法,像一个立方的盒子Password是个板斧,代表的是属性,给外部访问ss前面有点像蓝色橡皮擦的,表示字段,一般内部访问用。方法参数也用这个图标如上图所示,IEnumerable 前面... 阅读全文
posted @ 2015-08-14 15:39 南风叶 阅读(1225) 评论(0) 推荐(0) 编辑
摘要: static void DistinctTest() { int[] echo = { 1, 1, 2, 3, 4, 5, 5, 6, 6, 7, 8, 9, 8, 10 }; IEnumerable ienumerable = echo.... 阅读全文
posted @ 2015-08-14 14:28 南风叶 阅读(184) 评论(0) 推荐(0) 编辑
摘要: static void ByteTest() { byte[] namebytearray = System.Text.Encoding.UTF8.GetBytes("zzy"); string readstr = string.Empty;... 阅读全文
posted @ 2015-08-14 14:27 南风叶 阅读(233) 评论(0) 推荐(0) 编辑
摘要: static void ConsoleSmileExpressionTest() { byte[] namebytearray = new byte[] { 1, 2, 3, 4, 5, 6 }; string smileexpressst... 阅读全文
posted @ 2015-08-14 14:20 南风叶 阅读(279) 评论(0) 推荐(0) 编辑