Solved

Need to convert C# string to C++ integer

Posted on 2006-07-17
5
321 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…

751 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