T
tshad
I am getting this error with a bunch of my substring statements where I
don't know what the size of the string will be.
So I do something like:
if ((AppSettings.formName.ToUpper() != "ERC") &&
(((((string)r["tagName"]).Length >= 3) &&
(((string)r["tagName"]).Substring(0, 3) == "RMS")) ||
(((((string)r["tagName"]).Length >= 8) &&
(((string)r["tagName"]).Substring(0, 8) == "ROOM_ABV")))))
I had to add the length test to prevent this from happening.
Is this the best way around this.
Thanks,
Tom
don't know what the size of the string will be.
So I do something like:
if ((AppSettings.formName.ToUpper() != "ERC") &&
(((((string)r["tagName"]).Length >= 3) &&
(((string)r["tagName"]).Substring(0, 3) == "RMS")) ||
(((((string)r["tagName"]).Length >= 8) &&
(((string)r["tagName"]).Substring(0, 8) == "ROOM_ABV")))))
I had to add the length test to prevent this from happening.
Is this the best way around this.
Thanks,
Tom