I can use the mid function to parse a string but when I try to use either the LEFT or Right functions to parse a string it doesnt recognize the functions
str1 would be "Vis"
str2 would be "c .NET"
str3 would be "al Ba"
If you leave out the second parameter, it will just get the rest of
the string, from the character you specify. Otherwise it gets the
number of characters you specify after the first index you specify. Remember,
the params are Start and Length, not Start and End.
You should never use the Mid, Left and Right functions, because they
are part of the Visual Basic compatability library; something MS should
have left out, IMO.
The Microsoft.VisualBasic.whatever functions are mostly bad
programming practice. They are there so that the VB6 project migration
wizard will not fumble (the wizard itself is bad practice). You should
stay away from them. I even check functions that I am using (if I am
not sure of the library) with the Object Browser to make sure they
are not part of this library.
Note that not all of the functions in this library should be militantly
avoided (CodeDom uses an interface from this namespace, if I recall
correctly), but the VB6 ones should.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.