Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public struct Identifier
- {
- private string name;
- private string email;
- public bool Equals(Identifier other)
- {
- return string.Equals(name, other.name) && string.Equals(email, other.email);
- }
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is Identifier && Equals((Identifier) obj);
- }
- public override int GetHashCode()
- {
- unchecked
- {
- return ((name != null ? name.GetHashCode() : 0)*397) ^ (email != null ? email.GetHashCode() : 0);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement