Solved

Need to convert C# string to C++ integer

Posted on 2006-07-17
5
314 Views
Last Modified: 2010-04-16
Hello all,

I need to convert this C# string "00A17158" into an integer, to be able to pass it to my C++.dll. C++ is requiring for this string to be an integer.

Thanks,
Tone
0
Comment
Question by:worldknown
  • 2
5 Comments
 
LVL 25

Accepted Solution

by:
dstanley9 earned 250 total points
ID: 17125284
Is that supposed to be a hex string?  If so, use:

string s = "00A17158";
int value = int.Parse(s, System.Globalization.NumberStyles.AllowHexSpecifier);
0
 

Author Comment

by:worldknown
ID: 17125547
Thanks - i'll try and update you.
T
0
 

Author Comment

by:worldknown
ID: 17369754
i'm sorry, long story.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Bit flags and bit flag manipulation is perhaps one of the most underrated strategies in programming, likely because most programmers developing in high-level languages rely too much on the high-level features, and forget about the low-level ones. Th…
Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

759 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

20 Experts available now in Live!

Get 1:1 Help Now