Re: C# String Trim() Error!
- From: hiteshmangal@xxxxxxxxx
- Date: 14 Jun 2006 21:16:17 -0700
Hi Dat,
This code is working fine on my end and I am getting the expected
output.Could u please more elobrate ur problem.
Thanks,
Hitesh
Dat K. AU DUONG wrote:
Hi,
C# Annoying string function or Am I doing Something wrong?
In VB6/VB.NET I can code like:
value = value.trim()
and it just work!
But in c#, I event put in the additional check I still get the error.
if (value.Length > 0 && value != string.Empty){
value = value.trim();
}
The error message:
startIndex cannot be larger than length of string.
Parameter name: startIndex at
System.String.InternalSubStringWithChecks(Int32 startIndex, Int32
length, Boolean fAlwaysCopy) ...
Please Help!
Thanks.
Regards Dat.
.
- Follow-Ups:
- Re: C# String Trim() Error!
- From: Dat K. AU DUONG
- Re: C# String Trim() Error!
- References:
- C# String Trim() Error!
- From: Dat K. AU DUONG
- C# String Trim() Error!
- Prev by Date: Re: Arraylist.remove problem?? Please help.
- Next by Date: accessing wave file's sound data using csharp
- Previous by thread: C# String Trim() Error!
- Next by thread: Re: C# String Trim() Error!
- Index(es):