kalirajan
kalirajan

Reputation: 33

How to get the ASCII character in c#?

How can I get this ƒ character from the ASCII table..? I have tried like this.

  txt2 = (char)131;

I can able to get till 127 values only.. If I give more than 127 its returning NULL value. So how can I get till 255 ?

Upvotes: 3

Views: 162

Answers (1)

xanatos
xanatos

Reputation: 111860

ƒ isn't ASCII... it is Unicode, Unicode Character 'LATIN SMALL LETTER F WITH HOOK' (U+0192).

char ch = 'ƒ';

or

char ch = (char)0x0192;

or

char ch = '\x0192';

There are only 128 characters in the ASCII set (0-127), and there are no non-american letters (there are only A-Z and a-z)

Upvotes: 8

Related Questions