Skip to content

Instantly share code, notes, and snippets.

@eulerfx
Created May 20, 2012 01:14
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 eulerfx/2733072 to your computer and use it in GitHub Desktop.
Save eulerfx/2733072 to your computer and use it in GitHub Desktop.
Not always-valid entity
public class UserProfile
{
public string Name { get; set; }
// implementation omitted
public bool IsValid { get; }
}
var profile = new UserProfile();
// must query to ascertain validity
if (!profile.IsValid)
{
// throw exception, or...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment