Should I use a concatenation of my string fields as a hash code?
问题 I have an Address class in C# that looks like this: public class Address { public string StreetAddress { get; set; } public string RuralRoute { get; set; } public string City { get; set; } public string Province { get; set; } public string Country { get; set; } public string PostalCode { get; set; } } I'm implementing equality and so I need to override the hash code. At first I was going to use the hashcode formula from EJ but then I thought: These are all string fields, can't I just just use