getting an index of a character
<p>I'm having a problem getting an index of the character '-' of a string. Let me explain my problem.
First I have to read a line from a text file. The only line in the text file is           "Beta  =  62.5  *  (Sigma – Delta)  /  125"</p>

<pre><code>StreamReader rdr = new StreamReader(openPath, Encoding.Default); 

while (rdr.Peek() != -1)
{
     string strInput = rdr.ReadLine();
}
</code></pre>

<p>then I need to get the index of char '-'.</p>

<pre><code>int col = strInput.IndexOf('-');
</code></pre>

<p>After the above line 'col' is equal to -1. But as you can see the '-' character is in the above mentioned string which read from the text file. 
I couldn't figure out why I'm getting -1 as the index of '-'. help me...</p>
