Asc() Chr() VB to VB.NET Function

I every body !
I'll like to to know if using old function like Asc(), Chr() in VB.NET is a good thing, or if there is a "VB.NET" way to do those kind of function.

Tanks you !!


Comments

  • The ".NET way" would be to use the System.Convert class (Convert.ToInt32(Char), Convert.ToChar(Int32), etc.), but there is really no reason you shouldn't use the functions contained in the Microsoft.VisualBasic namespace, such as Asc and Chr. In fact, if you open Microsoft.VisualBasic.dll with Ildasm.exe, you'll see calls to System.Convert in those methods. Of course, any time you wrap a function in another function, there will be a performance difference, but no so much that you'd need to worry about it.

    Use whatever you feel comfortable with.

    : I every body !
    : I'll like to to know if using old function like Asc(), Chr() in VB.NET is a good thing, or if there is a "VB.NET" way to do those kind of function.
    :
    : Tanks you !!
    :
    :
    :

  • Tanks a lot !!!
    this is the exacte question i'm looking for !!



    : The ".NET way" would be to use the System.Convert class (Convert.ToInt32(Char), Convert.ToChar(Int32), etc.), but there is really no reason you shouldn't use the functions contained in the Microsoft.VisualBasic namespace, such as Asc and Chr. In fact, if you open Microsoft.VisualBasic.dll with Ildasm.exe, you'll see calls to System.Convert in those methods. Of course, any time you wrap a function in another function, there will be a performance difference, but no so much that you'd need to worry about it.
    :
    : Use whatever you feel comfortable with.
    :
    : : I every body !
    : : I'll like to to know if using old function like Asc(), Chr() in VB.NET is a good thing, or if there is a "VB.NET" way to do those kind of function.
    : :
    : : Tanks you !!
    : :
    : :
    : :
    :
    :

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories