internal static Exception TryToGuid(string s, out Guid result)
{
Exception exception = null;
result = Guid.Empty;
try
{
result = new Guid(s);
}
catch (ArgumentException)
{
exception = new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Guid"));
}
catch (FormatException)
{
exception = new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Guid"));
}
return exception;
}