/* * public bool CheckIfFalseNullZero() * { * if (IsRef) * return false; // ref is always true * if (value == null) // null or empty * return true; * * return value.GetType().IsValueType ? TValueHelper.CheckIfFalseNullZero(this) : false; * } */ public int CompareTo(TValue other, bool signed = true) { if (value == null && other.Value == null) { return(0); } if (value != null && other.Value != null) { if (value.GetType().IsValueType&& other.Value.GetType().IsValueType) { return(TValueHelper.CompareTo(this, other, signed)); } if (!value.GetType().IsValueType&& !other.Value.GetType().IsValueType) { return(value.Equals(other.Value) ? 0 : 1); } return(1); } return(1); }
public TValue ConvertTo(Type t) { return(TValueHelper.ConvertTo(this, t)); }