摘要: 在C#中,对格式的判断有一类专门函数,那就是TryParse。TryParse在各个不同的类型类(如int,string,DateTime)中,都是存在的。在TryParse中一般有两个参数,一个是待判断的字符串,另外一个是转换后的结果保存变量。string strDate = "2014-4-3" 阅读全文
posted @ 2016-11-24 16:02 东锅先生和蛇 阅读(22388) 评论(1) 推荐(1) 编辑
摘要: 所属命名空间:System.Collections.Generic public class List<T> : IList<T>, ICollection<T>, IEnumerable<T>, IList, ICollection, IEnumerable List<T>类是 ArrayList 阅读全文
posted @ 2016-11-20 16:37 东锅先生和蛇 阅读(1604) 评论(0) 推荐(0) 编辑
摘要: function unique(arr) { var result = [], hash = {}; for (var i = 0, elem; (elem = arr[i]) != null; i++) { if (!hash[elem]) { result.push(elem); hash[el 阅读全文
posted @ 2016-11-20 16:35 东锅先生和蛇 阅读(687) 评论(0) 推荐(0) 编辑
摘要: “一切都是对象”这句话的重点在于如何去理解“对象”这个概念。 ——当然,也不是所有的都是对象,值类型就不是对象。 function show(x) { console.log(typeof(x)); // undefined console.log(typeof(10)); // number co 阅读全文
posted @ 2016-10-29 21:01 东锅先生和蛇 阅读(116) 评论(0) 推荐(0) 编辑