title: Change this condition so that it does not always evaluate to 'true'
body: <p>Why is SonarQube complaining about this part of the code?</p>
  
  <p><a href="https://i.stack.imgur.com/rIwEB.png" rel="noreferrer"><img src="https://i.stack.imgur.com/rIwEB.png" alt="enter image description here"></a></p>
  
  <p>I checked this code and not always this value is true.</p>
  
  <pre><code>public static void WriteJson(object value)
  {
      decimal decimalValue = ((decimal?)value).Value;
      int intValue = (int)decimalValue;
      if (decimalValue == intValue)
          Console.WriteLine(intValue);
      else
          Console.WriteLine(decimalValue);
      Console.ReadKey();
  }
  </code></pre>
  
  <p>Why is SonarQube complaining about this?</p>