Convert a byte to an Int

Hi all,

I'm having a small (I hope) problem.

Can someone tell me how to convert a byte to its int value?

I have a method from a 3rd party object which returns the LCD brightness value of its screen. Its a value between 0 and 100. The documentation shows that the return value is a single byte.

How do I convert this byte value to its integer value?

byte b = ti.LcdBrightness;

Thanks,

Sunny
LVL 1
Sunny_KumarAsked:
Who is Participating?
 
AndyAinscowConnect With a Mentor Freelance programmer / ConsultantCommented:
Int32 i = Convert.ToInt32(b);
0
 
Sunny_KumarAuthor Commented:
Thanks, I was thinking far too complicated!
0
All Courses

From novice to tech pro — start learning today.