VB 2010 functions RRS feed

  • General discussion

  • As a pro VB6/SQL server developer I recently downloaded VB2010 and bought Alessandro Del Sole's VB 2010 unleashed book.

    The book details all the new functions / methods such as string.contains etc. Having practiced a little I discover that VB 2010 still has reference to VB6 functions such as Instr() (which by the way seems to give a different result from "string.contains")

    My question is should we be using the new 2010 methods / functions or is it still OK to use the V 6 equivalents such as Instr instead of contains? Will the functions such as Instr() and Right() etc. be deprecated and if so, is there a time frame for doing so.


    Monday, June 13, 2011 3:41 PM

All replies

  • Hi,

    Most of the regulars forum contributors here would probably recommend using the newer methods.

    In the newer VB.Net methods all STRING operations are zero based as far as I know too, so be careful.


    ALL of the ( VB6 ) older ones reside in the Microsoft.VisualBasic namespace as far as I know.


    I hope this helps.  :)




    Click this link to see how to insert a picture into a forum post.

    Installing VB6 on Windows 7

    XNA is coming to VB.Net

    Monday, June 13, 2011 3:50 PM
  • Those functions are not going to be deprecated.  They are a core part of the Visual Basic language - as such they are perfectly acceptable to use.  That said, I would be familiar with the framework methods as well - since, it makes it easier to transition to other languages should the need arise :)

    Tom Shelton
    Monday, June 13, 2011 3:58 PM