• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 327
  • Last Modified:

Need to convert C# string to C++ integer

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
worldknown
Asked:
worldknown
  • 2
1 Solution
 
dstanley9Commented:
Is that supposed to be a hex string?  If so, use:

string s = "00A17158";
int value = int.Parse(s, System.Globalization.NumberStyles.AllowHexSpecifier);
0
 
worldknownAuthor Commented:
Thanks - i'll try and update you.
T
0
 
worldknownAuthor Commented:
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.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now