How to get the ascii value of a char and string in c#
plss help me it's urgent
thanks,
pramod
How to get the ascii value of a char and string in c#
plss help me it's urgent
thanks,
pramod
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Niradhip ChakrabortyRank #429 · 5.8K reputationPosted Mar 23, 2009, 9:06 AM EDT
// Convert the string into a byte[].
byte[] asciiBytes = Encoding.ASCII.GetBytes(value);
Vimal KandasamyRank #2,151 · 661 reputationPosted Mar 23, 2009, 4:09 AM EDT
i may not be exact
but
if you assign a char value into an int variable
like
int ascii='a';
then ascii will contain ascii value[97] of 'a'.
it may not be the right way.but it wil help you to find out.