chr in VB Vs ASCII.GetString

  • Thread starter Thread starter Suhail Salman
  • Start date Start date
S

Suhail Salman

Dear All,

is there any difference with the return strings from the visual basic
function chr and the .NET method ASCII.GetString i see a difference when the
ascii code passed to the two functions is greater than 127 am i right?
for example the ASCII Code 203 is returned in C# as "K" while in VB "Ë"

can i get the output in .net to be the same as VB6 ?

any one can help
 
Suhail Salman said:
is there any difference with the return strings from the visual basic
function chr and the .NET method ASCII.GetString i see a difference when the
ascii code passed to the two functions is greater than 127 am i right?

There's no such thing as an ASCII code greater than 127.
for example the ASCII Code 203 is returned in C# as "K" while in VB "Ë"

There *is* no ASCII 203.
can i get the output in .net to be the same as VB6 ?

Using Encoding.Default.GetString - I believe VB just uses the system
default encoding.
 
Thank u,
so am just confused between the system default encoding and the ASCII
encoding....
now it works...

regards,
Suhail

Suhail Salman said:
is there any difference with the return strings from the visual basic
function chr and the .NET method ASCII.GetString i see a difference when the
ascii code passed to the two functions is greater than 127 am i right?

There's no such thing as an ASCII code greater than 127.
for example the ASCII Code 203 is returned in C# as "K" while in VB "Ë"

There *is* no ASCII 203.
can i get the output in .net to be the same as VB6 ?

Using Encoding.Default.GetString - I believe VB just uses the system
default encoding.
 

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

Back
Top