Beta2 C# breaks this code
ArgumentOutOfRange exception is thrown in these cases:
"ArgumentOutOfRangeException count or startIndex is negative.
-or-
count plus startIndex specify a position not within this instance." (Source:
MS .NET SDK Documentation)
Since 1 + address.Lenth is more that the length of the string, exception is
rased. Use on of following syntaxes:
colonPos = address.IndexOf(":", 0, address.Length);
colonPos = address.IndexOf(":", 1, address.Length-1);
Todor Todorov
Developer
Quote:
> This worked fine with Beta 1 but Beta 2 throws a
> System.ArgumentOutOfRangeException. Why??
> string address;
> int colonPos;
> address = "N11:0";
> colonPos = address.IndexOf(":", 1, address.Length);