Solved

Convert a byte to an Int

Posted on 2011-03-04
2
429 Views
Last Modified: 2012-05-11
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
0
Comment
Question by:Sunny_Kumar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 500 total points
ID: 35037361
Int32 i = Convert.ToInt32(b);
0
 
LVL 1

Author Closing Comment

by:Sunny_Kumar
ID: 35037421
Thanks, I was thinking far too complicated!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question