Harvey Triana <(E-Mail Removed)> wrote:
> Mark-
>
> My original question is "Which approach has better performance?", say 1) my
> custom library or 2) namespace Micrososft.VisualBasic
>
> -- Micrososft.VisualBasic has to be heavy, -isn't it?.
In many cases it is, but Right is actually reasonably efficient.
There'll be the extra baggage of loading the DLL in the first place,
and you're less likely to be compatible with other CLRs such as Rotor
and Mono, but the performance isn't likely to be an issue.
Personally I'd stick my own implementation into a string utility class
- there are bound to be utility calls you want to be able to make which
*aren't* covered by the VB assembly. It also means you can determine
the desired behaviour yourself - your implementation behaves
differently to the VB one when you pass in a negative length, for
instance.
--
Jon Skeet - <(E-Mail Removed)>
http://www.pobox.com/~skeet Blog:
http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too