title: Creating a Temperature class which supports different units (Celsius, Fahrenheit, Kelvin)
body: <p>I'm working on a class to help me to convert between units, and I need to ask about the best way to create this work.</p>
  
  <p>This is my sample code about temperature:</p>
  
  <pre><code>        public class Temperature
  {
      private double _Celsius = 0;
      public double Celsius
      {
          get { return _Celsius; }
          set
          {
              _Fahrenheit = (value * 9 / 5) + 32;
              _Kelvin = value + 273.15;
          }
      }
      private double _Fahrenheit = 0;
      public double Fahrenheit
      {
          get { return _Fahrenheit; }
          set
          {
              _Celsius = (value - 32) * 5/9;
              _Kelvin = _Celsius + 273.15;
          }
      }
      private double _Kelvin = 0;
      public double Kelvin
      {
          get { return _Kelvin; }
          set
          {
              _Celsius = value - 273.15;
              _Fahrenheit = (_Celsius * 9 / 5) + 32;
          }
      }
  }
  </code></pre>
  
  <p>I hope to know if there is another good one for this class or not?</p>