P
Peter Row
Hi,
I know this has been asked before, but reading the threads it is still not
entirely clear.
Deciding which .Replace( ) to use when.
Typically if I create a string in a loop I always use a StringBuilder. At
present I am
porting a VB6 webclass app to VB.NET and therefore I am trying to make it as
efficent as possible via the new functionality of VB.NET.
At present I have (in various places):
variableX = variableX.Replace("a string", "another string")
In some cases the above variableX will have 4+ replaces virutally one after
the
other with 1 or 2 of the replacement strings having length > 100.
This seems like the perfect candidate for StringBuilder.Replace instead of
String.Replace
what does anybody think?
Regards,
Pete
I know this has been asked before, but reading the threads it is still not
entirely clear.
Deciding which .Replace( ) to use when.
Typically if I create a string in a loop I always use a StringBuilder. At
present I am
porting a VB6 webclass app to VB.NET and therefore I am trying to make it as
efficent as possible via the new functionality of VB.NET.
At present I have (in various places):
variableX = variableX.Replace("a string", "another string")
In some cases the above variableX will have 4+ replaces virutally one after
the
other with 1 or 2 of the replacement strings having length > 100.
This seems like the perfect candidate for StringBuilder.Replace instead of
String.Replace
what does anybody think?
Regards,
Pete