Doogie wrote:
I remember I was
taught that using commands like Trim$ and LTrim$ instead of Trim and
LTrim were the better way to go (although I cannot remember why).
Does this still hold true in VB.NET?
No.
The reason Trim$() was preferable to Trim() was because they were both
different functions. Trim$() returned a String, Trim() returned a Variant
which was then implicitly converted to a string in your code. The Variant
approach used additional resources and was slower to execute.
In VB.NET they have tidied all of this up now, and there is a single
function called Trim() which returns a String. There's no equivalent to the
Variant-returning version of the function from VB6. If you follow the
function call with the $ suffix, this will be tolerated but ignored.
Hope that helps,
--
(O)enone