Solved

Need to convert C# string to C++ integer

Posted on 2006-07-17
5
322 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

617 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