摘要: 使用方法:1、 生成一个新GUID:var guid = Guid.NewGuid();2、 生成一个所有值均为0的GUID:a) var guid = new Guid();b) var guid = Guid.Empty;3、 比较两个GUID是否相等:g1.Equals(g2);4、 获取Guid的字符串形式。其中, format为String类型的可选参数,其含义为:a) “N”: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxb) “D” 由连字符分隔的 32 位数字 xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxc) “B” 括在大括号中 阅读全文
posted @ 2011-09-28 10:33 云中雀 阅读(1767) 评论(0) 推荐(0) 编辑