How do I compare string with text in a proper way?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/44288/differences-in-string-compare-methods-in-c-sharp">Differences in string compare methods in C#</a>  </p>
</blockquote>



<p>I know that in C# strings are objects, and I just learned about the CompareTo method when comparing two strings. But what if I need to compare the string to a specific text value?</p>

<p>Now I'm doing this:</p>

<pre><code>private string choice;

[...some code...]

if (choice == "1")
        {
            Console.WriteLine("You choose 1");
            Console.ReadLine();
        }
        else if (choice == "2")
        {
            Console.WriteLine("You choose 2");
            Console.ReadLine();
        }
etc...
</code></pre>

<p>And it works just as I want. But is it good coding? Can not find any information on this specific topic.</p>
