/// <summary> /// Gets a string representation of BodyCompositionValue. /// </summary> /// /// <returns> /// A string representation of the BodyCompositionValue. /// </returns> /// public override string ToString() { if (_massValue != null && _percentValue != null) { return(string.Format( Resources.BodyCompositionValueToStringFormatMassAndPercent, _massValue.ToString(), _percentValue * 100)); } if (_massValue != null) { return(_massValue.ToString()); } if (_percentValue != null) { return(string.Format( Resources.Percent, _percentValue * 100)); } return(string.Empty); }