Solved

Convert a byte to an Int

Posted on 2011-03-04
2
425 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
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now