public static R GetOrDefault <T, R>(this TryGet <T> tryGet, R def) where T : R { if (tryGet.Succeeded) { return(tryGet.Value); } return(def); }
public bool Equals(TryGet <T> other) { return(Succeeded == other.Succeeded && Equals(Value, other.Value)); }