Solved

Convert a byte to an Int

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Close form "before" open 3 40
Example works but why do I need to click twice on button 4 43
insert value of checklistbox checked 4 27
MailAddress in vb 4 15
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…
Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

803 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