Skip to content

Instantly share code, notes, and snippets.

@pparadis
Created July 8, 2015 10:17
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 pparadis/1c42c70fead3bc390c34 to your computer and use it in GitHub Desktop.
Save pparadis/1c42c70fead3bc390c34 to your computer and use it in GitHub Desktop.
User
public class User
{
public string FirstName { get; set; }
public string LastName { get; set; }
public LoginInformation LoginInformation { get; set; }
public class Comparer : IEqualityComparer<User>
{
public bool Equals(User x, User y)
{
return x.LoginInformation.LoginLocation == y.LoginInformation.LoginLocation;
}
public int GetHashCode(User obj)
{
return obj.LoginInformation.LoginLocation.GetHashCode();
}
}
}
public class LoginInformation
{
public string LoginLocation { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment