public Confidence(ConfidenceRatingEnum rating) { if (rating == ConfidenceRatingEnum.numeric) { throw new ArgumentException("To set numeric confidence level, use another constructor."); } this.rating = rating; }
public Confidence(float value) { if ((value < 0.0f) || (value > 1.0f)) { throw new ArgumentException("Confidence level must be in [0..1] range."); } rating = ConfidenceRatingEnum.numeric; this.value = value; }
public Confidence(ConfidenceRatingEnum rating) { if (rating == ConfidenceRatingEnum.numeric) throw new ArgumentException("To set numeric confidence level, use another constructor."); this.rating = rating; }
public Confidence(float value) { if ((value < 0.0f) || (value > 1.0f)) throw new ArgumentException("Confidence level must be in [0..1] range."); rating = ConfidenceRatingEnum.numeric; this.value = value; }