how to use string.compare
<p>There is an error with that string.compiler thingy and i dont know what to do. i really need some help please</p>

<pre><code>char[] valWord = new char[100];

Console.WriteLine(textBox1.Text);
valWord = textBox1.Text;
int beg = 0;
int val = 0;
int value = 0;

for (int i = 0; i &lt; 100; i++)
{
    if (valWord[i] == ' ' || valWord[i] == '\0')
    {
        char[] temp = new char[100];
        for (int j = 0; j &lt; i - beg; j++)
        {
            temp[j] = valWord[beg + j];
        }
        temp[i - beg] = '\0';


//there is an error in this if statement: String.Compare

        if (String.Compare(temp, "thousand") == 0)
        {
            value += (val*1000);
            val = 0;
        }
        else if (String.Compare(temp, "hundred") == 0)
        {
            value += (val*100);
            val = 0;
        }
        else if (String.Compare(temp, "one") == 0)
        {
            val = 1;
        }
        else if (String.Compare(temp, "two") == 0)
        {
            val = 2;
        }

        if (valWord[i] == '\0')
        {
            value += val;
            break;
        }
    }
    Console.WriteLine(textBox2.Text);

}
else
{
    _list.Add(name, new GenericList());
}
</code></pre>
