/// <summary> /// Creates a new <see cref="IReadOnlyList{NameValue}"/> with all names/values. /// </summary> /// <returns>The values and string representations of <typeparamref name="T"/>.</returns> public IReadOnlyList <NameValue <T> > GetNameValues() { NameValue <T>[] nvs = new NameValue <T> [Values.Count]; for (int i = 0; i < Values.Count; i++) { nvs[i] = new(Values[i], Names[i]); } return(nvs); }
public bool Equals(NameValue <T> other) { return(EqualityComparer <T> .Default.Equals(Value, other.Value) && Name == other.Name); }