int An integer hash code derived from the culture code.
Computes a hash code for this identifier.
Consistent with LocaleIdentifier.Equals: identifiers that compare equal produce the same hash code,
because the code is hashed case-insensitively. The undefined identifier hashes to 0. Safe to use as a
dictionary key.
<para>Use an identifier as a dictionary key.</para>
using System.Collections.Generic; using Unity.Localization;
namespace Unity.Localization.Samples { public class LocaleIdentifierHashCodeExample { public void Run(LocaleIdentifier identifier) { var counts = new Dictionary<LocaleIdentifier, int>(); counts[identifier] = counts.GetValueOrDefault(identifier) + 1; } } }