Created
August 23, 2016 15:18
-
-
Save DominicCronin/3ed0f302867c98e24622dbd3d9659c71 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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