Skip to content

Instantly share code, notes, and snippets.

@DominicCronin
Created August 23, 2016 15:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DominicCronin/3ed0f302867c98e24622dbd3d9659c71 to your computer and use it in GitHub Desktop.
Save DominicCronin/3ed0f302867c98e24622dbd3d9659c71 to your computer and use it in GitHub Desktop.
set
{
if (value == null)
{
this._guid = null;
return;
}
if (value.Length == 0)
{
this._guid = new Guid?(Guid.Empty);
return;
}
Guid value2;
if (Guid.TryParse(value, out value2))
{
this._guid = new Guid?(value2);
return;
}
throw new ArgumentOutOfRangeException();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment