Skip to content

Instantly share code, notes, and snippets.

@pparadis

pparadis/user.cs

Created Jul 8, 2015
Embed
What would you like to do?
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