[vn-tech] C# converting hex string to decimal - help

Huynh, Loi LHuynh at ndsuk.com
Wed Mar 16 19:22:31 PST 2005


 
Not sure if this list is still active but it is awfully quite and got a
message coming back from vn-tech-bounces at mail.saigon.com
<mailto:vn-tech-bounces at mail.saigon.com>  
 
Anyway the answer:
 
string X = "01B0";
 
string hexstring = Convert.ToInt32(int.Parse( X ,
 
System.Globalization.NumberStyles.HexNumber).ToString());
   
 
Cheers,
 
Loi Huynh
NDS Asia Pacific
P: +61-2-9025-3007
F: +61-2-9025-3099
M: +61-417-735-521
E:  <mailto:lhuynh at ndsuk.com> lhuynh at ndsuk.com
 

  _____  

From: vn-tech-bounces at mail.saigon.com
[mailto:vn-tech-bounces at mail.saigon.com] On Behalf Of Huynh, Loi
Sent: Wednesday, March 16, 2005 4:47 PM
To: 'vn-tech at saigon.com'
Subject: [vn-tech] C# converting hex string to decimal - help




Hi, 

I am trying to get a C# string X = "000A" to value 10 decimal. Or X = "01B0"
to 432 in decimal. 

Could not find any simple string class method to do so.  Please advise. 

Thanks, 

Loi. 

Loi Huynh 
NDS Asia Pacific 
P: +61-2-9025-3007 
F: +61-2-9025-3099 
M: +61-417-735-521 
E:  <mailto:lhuynh at ndsuk.com> lhuynh at ndsuk.com 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.le.org/pipermail/vn-tech/attachments/20050316/dc414cbd/attachment-0001.html


More information about the vn-tech mailing list