Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public bool Equals(Owned other)
- {
- return other.Owner == Owner && Type == other.Type;
- }
- public override bool Equals(object obj)
- {
- if (obj.GetType() != typeof(Owned)) return false;
- return Equals((Owned)obj);
- }
- public static bool operator ==(Owned x, Owned y)
- {
- return x.Equals(y);
- }
- public static bool operator !=(Owned x, Owned y)
- {
- return !x.Equals(y);
- }
- public override int GetHashCode()
- {
- unchecked
- {
- return (Owner*397) ^ Type.GetHashCode();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement