Skip to content

Instantly share code, notes, and snippets.

@jittuu
Created June 26, 2011 06:34
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 jittuu/1047321 to your computer and use it in GitHub Desktop.
Save jittuu/1047321 to your computer and use it in GitHub Desktop.
if (user.IsGoldPartner()) 
{
// do something
}
public class User
{
public int PostedPostCount { get; set; }
public DateTime LastActivityDate { get; set; }
public bool IsGoldPartner()
{
return this.PostedPostCount > 100 && this.LastActivityDate >= DateTime.Today.AddMonths(-3)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment