Home
Manage Your Code
Snippet: IsGuid (C#)
Title: IsGuid Language: C#
Description: check for is GUID Views: 1082
Author: Abison Mathew Jose Date Added: 10/29/2008
Copy Code  
1private bool IsGuid(string guid)
2        {
3            try
4            {
5                Guid id = new Guid(guid.ToString());
6            }
7            catch (FormatException)
8            {
9                return false;
10            }
11            return true;
12        }