摘要:
转载自:http://www.cnblogs.com/kiddo/archive/2008/04/16/1156295.html判断是否GUID public bool IsGUID(string str) { Match m = Regex.Match(str, @"^[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$", RegexOptions.IgnoreCase); if (m.Success) { //可以转换 //Guid guid = new Guid(str); return true; } else { //不可转换 r 阅读全文