replacements for chr() and asc()

J

John A Grandy

in vb6 it was very common to use the functions chr() and asc() to perform
various kinds of string manipulation ...

these are still available in .net ...

but i would guess that it would be better to switch to "the .net way of
doing things" ...

any ideas anyone?
 
J

Jay B. Harlow [MVP - Outlook]

John,
I would recommend using ChrW & AscW as they are the Unicode versions & can
be used with constants!

BTW: Chr, ChrW, Asc, AscW are used for Char manipulation, not string
manipulation per se.

The System.Convert class & the System.Text.Encoding class have similiar
functionality to AscW & ChrW and Asc & Chr however they are "more work" to
use.

Hope this helps
Jay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top