Created
July 8, 2015 10:17
-
-
Save pparadis/1c42c70fead3bc390c34 to your computer and use it in GitHub Desktop.
User
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
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