simple conversion
Hi,
I am new to C#.. I want to convert a byte or int to string or text.
I have a byte with value 130, I just want to show it in a textBox or a label. If I try to do it directly, like:
txtDataReceived.Text = myDataByte;
then I get the obvious error:
(Cannot implicitly convert type 'byte' to 'string')
I thought it will be very simple.. any idea how to sort it out.
Thanks
Ehab SalehPosted Apr 24, 2009, 9:35 AM
Sateesh ArvetiPosted Apr 22, 2009, 5:33 AM
Use .ToString() method on the byte variable (or) Convert.ToString(byte variable)