title: C# String greater than or equal code string
body: <p>I'm trying to get my code working my comparing if a string is bigger or less than 10, but it doesn't work correctly. It writes 10 or more even if the value is less than 10.</p>
  
  <pre><code>int result = string1.CompareTo("10");
  if (result &lt; 0)
  {
       Console.WriteLine("less than 10");
  }
  else if (result &gt;= 0)
  {
       Console.WriteLine("10 or more");
  } 
  </code></pre>