Click here to Skip to main content
15,885,216 members

Response to: Converting chars to ASCII in C#

Revision 2
Richard is right. To get the same bytes in C# as the bytes in VB, use this:
C#
byte i1 = Encoding.Default.GetBytes("œ")[0];

The GetBytes method returns a byte array, with Encoding.Default.GetBytes("œ")[0] you get the first value of the byte array.

Hope this helps.
Posted 27-Dec-12 5:54am by Thomas Daniels.
Tags: ,