Find IndexOf in C#
<p>How do i find <code>indexof()</code> from :  </p>

<pre><code>string value = "     50     ";
</code></pre>

<p>There are spaces...but I don't want to remove them using <code>SubString()</code> or <code>Replace()</code>...  </p>

<p>I have to remove <code>leftindex</code> spaces until I get <code>"5"</code> and remove <code>rightindex</code> spaces after <code>"0"</code>.</p>
