Click here to Skip to main content
15,917,004 members
Home / Discussions / C#
   

C#

 
GeneralRe: Printing a windowsform Pin
Ajay.k_Singh18-Mar-08 21:11
Ajay.k_Singh18-Mar-08 21:11 
GeneralRe: Printing a windowsform Pin
mrcsn18-Mar-08 23:30
mrcsn18-Mar-08 23:30 
GeneralRe: Printing a windowsform Pin
Ajay.k_Singh19-Mar-08 1:20
Ajay.k_Singh19-Mar-08 1:20 
GeneralRe: Printing a windowsform Pin
mrcsn19-Mar-08 21:10
mrcsn19-Mar-08 21:10 
GeneralRe: Printing a windowsform Pin
Giorgi Dalakishvili18-Mar-08 21:50
mentorGiorgi Dalakishvili18-Mar-08 21:50 
Generalhexadecimal value convert to extended ascii code. Pin
kamalesh574318-Mar-08 14:59
kamalesh574318-Mar-08 14:59 
GeneralRe: hexadecimal value convert to extended ascii code. Pin
Luc Pattyn18-Mar-08 15:38
sitebuilderLuc Pattyn18-Mar-08 15:38 
GeneralRe: hexadecimal value convert to extended ascii code. Pin
Anthony Mushrow18-Mar-08 15:51
professionalAnthony Mushrow18-Mar-08 15:51 
Well, you pretty much want hex -> int -> ascii right?

Well, you can use Convert.ToInt32, like this:

string hex = "0x0F";
int num = 0;
num = Convert.ToInt32(hex, 16);


The first parameter is the string containing the number, and the second is the base. ie Hex is base 16 and normal int's are base 10. Binary is base 2.

So, now that you have a number cast it as a char, that should give you your ascii character. If you want to build a string, then set up an array of bytes, and fill it with the results from your Convert.ToInt32; you can then get a string from the array by using Encoding.ASCII.GetString(arrayOfBytes);

And, of course, these could have been easily found out by typing something like "c# hex to ascii" or "c# hex to int" something like that.

EDIT: Oh, and you can figure out how to get it into the rich text box yourself right? Good.

My current favourite word is: Nipple!
-SK Genius


GeneralRe: hexadecimal value convert to extended ascii code. Pin
PIEBALDconsult18-Mar-08 17:34
mvePIEBALDconsult18-Mar-08 17:34 
GeneralRe: hexadecimal value convert to extended ascii code. Pin
kamalesh574318-Mar-08 19:27
kamalesh574318-Mar-08 19:27 
GeneralRe: hexadecimal value convert to extended ascii code. Pin
PIEBALDconsult19-Mar-08 7:54
mvePIEBALDconsult19-Mar-08 7:54 
GeneralRe: hexadecimal value convert to extended ascii code. Pin
Guffa19-Mar-08 0:06
Guffa19-Mar-08 0:06 
QuestionHardware Pin
nelsonpaixao18-Mar-08 14:09
nelsonpaixao18-Mar-08 14:09 
GeneralRe: Hardware Pin
Xmen Real 18-Mar-08 14:12
professional Xmen Real 18-Mar-08 14:12 
GeneralRe: Hardware Pin
Luc Pattyn18-Mar-08 14:19
sitebuilderLuc Pattyn18-Mar-08 14:19 
GeneralRe: Hardware Pin
Xmen Real 18-Mar-08 14:21
professional Xmen Real 18-Mar-08 14:21 
GeneralRe: Hardware Pin
Luc Pattyn18-Mar-08 14:22
sitebuilderLuc Pattyn18-Mar-08 14:22 
QuestionIs it possible to load a form in an outlook addin Pin
gavin lane18-Mar-08 14:06
gavin lane18-Mar-08 14:06 
GeneralRe: Is it possible to load a form in an outlook addin Pin
gavin lane18-Mar-08 14:31
gavin lane18-Mar-08 14:31 
Questionheader bar Pin
nelsonpaixao18-Mar-08 13:19
nelsonpaixao18-Mar-08 13:19 
GeneralRe: header bar Pin
PIEBALDconsult18-Mar-08 17:41
mvePIEBALDconsult18-Mar-08 17:41 
GeneralRe: header bar Pin
blakey40418-Mar-08 23:53
blakey40418-Mar-08 23:53 
GeneralRe: header bar Pin
PIEBALDconsult20-Mar-08 9:48
mvePIEBALDconsult20-Mar-08 9:48 
QuestionHttp request and XML Pin
Rajeeshun18-Mar-08 11:36
Rajeeshun18-Mar-08 11:36 
GeneralRe: Http request and XML Pin
pmarfleet18-Mar-08 11:44
pmarfleet18-Mar-08 11:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.