Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

conversion of number's in C#

Status
Not open for further replies.

embpic

Advanced Member level 3
Joined
May 29, 2013
Messages
742
Helped
80
Reputation
160
Reaction score
77
Trophy points
1,308
Location
india
Activity points
5,213
i am getting problem while converting decimal number to hexadecimal number. i am doing small tool for timer delay calc.
so how to convert decimal to hex and hex to decimal.
 

The internal numer format is binary. Strings can represent numbers in decimal or hexadecimal format.
 

yes but when i do
Code:
texbox1.text = decimalNumber.Tostring();
it shows only decimal number.

- - - Updated - - -

i wanna display hex number on textbox
 

Try
texbox1.text = decimalNumber.Tostring("X2");
 

No response, so I will elaborate?

texbox1.text = decimalNumber.Tostring("X2");

Formatting string: X = uppercase hex digits, 2 = 2 hex digits.

texbox1.text = decimalNumber.Tostring("x4");

Formatting string: x = lowercase hex digits, 4 = 4 hex digits.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top