Checks if string is a valid GUID.
True, if the string is a GUID, otherwise false.
The function checks that the length of the string id, starts with a starting brace ({) and ends with closing brace (}).
string id = StringUtil.GetString(Request.QueryString["id"]);
if (MainUtil.IsID(id)) {
IMasterItem item = MasterFactory.GetItem(id);
}
MainUtil Class | Sitecore Namespace