substring help in c#
<p>I have string qty__c which may or may not have a decimal point
The code below gives me a System.ArgumentOutOfRangeException: Length cannot be less than zero.</p>

<pre><code>qty__c = qty__c.Substring(0, qty__c.IndexOf("."));
</code></pre>

<p>How do i cater to if there is no "."?</p>

<p>Thanks</p>
