473,405 Members | 2,379 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Hex to int conversion support

Newbie trying to play around with forms creating a int to hex converter.
Does the framework have a conversion class? I can't believe that yet
another needs to be created.

Thanks for the feedback
Ron
Jul 21 '05 #1
1 1318
R Lee <W@W.W> wrote:
Newbie trying to play around with forms creating a int to hex converter.
Does the framework have a conversion class? I can't believe that yet
another needs to be created.


Just use the appropriate format specifier, x or X:

int i = 123;
string s = i.ToString("x");

s is now "7b"

See also Convert.ToString(int, int).

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Chris Brown | last post by:
Hello, I work for a company that sells a product with a VFP frontend/MSSQL backend, and we have become aware for many reasons the we need to switch over to ..net. The problem is that our...
1
by: Kel Good | last post by:
Hello, I recently created a structure in C# that offers several implicit conversion, hoping I could then reference the C# project from a VB.Net project, and use this object in VB.Net. It does...
7
by: Sanjay Kedare | last post by:
Hi, I am evaluating various alternatives of converting Delphi (Ver 4.0) screens to C# screens. Are there any tools available for such conversion? if yes how much conversion do they achieve? The...
18
by: Ger | last post by:
I have not been able to find a simple, straight forward Unicode to ASCII string conversion function in VB.Net. Is that because such a function does not exists or do I overlook it? I found...
0
by: Joergen Bech | last post by:
Help! Looking for a .Net-kompatible component for converting between HTML and RTF (both ways). Asked this question a few days ago and received this link:...
4
by: Chris Brown | last post by:
Hello, I work for a company that sells a product with a VFP frontend/MSSQL backend, and we have become aware for many reasons the we need to switch over to ..net. The problem is that our...
1
by: Philip Bondi | last post by:
Hello to all SQL Server junkies who work with non-English characters: For people running scripts from the command line using ANSI files with special characters, it is very important to use isql...
0
by: Lou Evart | last post by:
DOCUMENT CONVERSION SERVICES Softline International (SII) operates one of the industry's largest document and data conversion service bureaus. In the past year, SII converted over a million...
0
by: maheshmohta | last post by:
Background Often while remodeling legacy application, one of the important tasks for the architects is to have an optimum usage of storage capabilities of database. Most of the legacy applications...
4
by: =?Utf-8?B?c2lwcHl1Y29ubg==?= | last post by:
Hi I am converting a VS2005 Solution to VS2008 Solution and all went well I checked the Solution file (sln) and Project file (csproj) into SVN - I checkout the solution from SVN and it want to ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.