public bool Equals(StringComparisonString <TStringComparison>?other) { if (other is null) { return(false); // this != null } return(Equals(other.Value)); // call Equals(string) }
public int CompareTo(StringComparisonString <TStringComparison>?other) { // https://msdn.microsoft.com/en-us/library/4d7sx9hd(v=vs.110).aspx if (other is null) { return(1); // If other is not a valid object reference, this instance is greater. } if (ReferenceEquals(Value, other.Value)) { return(0); } return(CompareTo(other.Value)); // call CompareTo(string) }