private void ValidateAndSet(float r, float g, float b, float a) { if (!IsValid(r, g, b, a)) { throw new ArgumentException("Invalid variable value."); } else { this.r = r; this.g = g; this.b = b; this.a = a; } }