I have a structure in C#:
public struct UserInfo { public string str1 { get; set; } public string str2 { get; set; }
Perhaps something like str1.GetHashCode() + str2.GetHashCode()? or (str1.GetHashCode() + str2.GetHashCode()) / 2? This way it would be the same regardless of whether str1 and str2 are swapped....