array replace

  • Thread starter Thread starter Frank
  • Start date Start date
F

Frank

Hello all,
is there a more efficient way to do the next replace?
For i = 0 To arrMsg .GetUpperBound(0)

arrMsg (i) = arrMsg (i).ToString.Replace(vbCr, "")

Next i



Thanx
 
* "Frank said:
is there a more efficient way to do the next replace?
For i = 0 To arrMsg .GetUpperBound(0)

arrMsg (i) = arrMsg (i).ToString.Replace(vbCr, "")

Next i

I doubt that there is a more efficient way. But you can skip the
'ToString' if you are dealing with an array of strings.
 
If the number of elements won't be changing, a small small improvement would be

x = arrMsg .GetUpperBound(0)
For i = 0 To x

Jay
 
Back
Top