/// <summary> /// Returns a hash code for this instance. /// </summary> /// <returns> /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. /// </returns> public override int GetHashCode() { unchecked { return(((FamilyNames != null ? FamilyNames.GetHashCode() : 0) * 397) ^ (Key != null ? Key.GetHashCode() : 0)); } }
/// <summary> /// Returns a <see cref="string" /> that represents this instance. /// </summary> /// <returns> /// A <see cref="string" /> that represents this instance. /// </returns> public override string ToString() { if (Key != null) { return(Key + "#" + FamilyNames); } return(FamilyNames.ToString()); }
/// <summary> /// Returns a hash code for this instance. /// </summary> /// <returns> /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. /// </returns> public override int GetHashCode() { unchecked { var hash = (int)2186146271; hash = (hash * 15768619) ^ FamilyNames.GetHashCode(); if (Key != null) { hash = (hash * 15768619) ^ Key.GetHashCode(); } return(hash); } }
public FamilyName(FamilyNames name) { family_name_enum = name; family_name_string = name.ToString(); family_id = (int)name; }
public FirstNamesTests(ITestOutputHelper helper) { _helper = helper; _underTest = new FamilyNames(); }