Hexa value appears while converting string value to int.

Ask general questions here.
manishrn91
Posts: 16
Joined: Wed Aug 17, 2016 9:26 am

Hexa value appears while converting string value to int.

Post by manishrn91 » Wed Aug 24, 2016 10:23 am

Capture.PNG
Capture.PNG (2.99 KiB) Viewed 519 times
The attachment Capture.PNG is no longer available
Hi All


We are using Ranorex 6.0.1,While writing a code in usercode we have observed one strange behavior when converting string to Int.
Code:
string count="64";
int a= Convert.ToInt32(count);

Whenever the value for "count" was 2 raise to power of 6,7 etc the value in "a" was taken as hexadecimal decimals like 64(0x40) ... so on, and rest all others it took whole numbers like if count was 81 "a" was assigned 81.

Could you please tell us why this is happening?


Regards,

manishrn91
Posts: 16
Joined: Wed Aug 17, 2016 9:26 am

Re: Hexa value appears while converting string value to int.

Post by manishrn91 » Wed Aug 24, 2016 10:25 am

when value is other that range of 64.
Attachments
Capture2.PNG
Capture2.PNG (4.52 KiB) Viewed 517 times

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Hexa value appears while converting string value to int.

Post by Support Team » Thu Aug 25, 2016 12:23 pm

Hello manishrn91,

thank you for reporting the issue. I added an entry in our bug tracking system. You can solve this by changing the setting "Show values in hexadecimal" twice in the "Local variables" dialog in Ranorex Studio.
LocalVariablesDialog.png
LocalVariablesDialog.png (5.91 KiB) Viewed 502 times
Regards,
Bernhard
.
Image

manishrn91
Posts: 16
Joined: Wed Aug 17, 2016 9:26 am

Re: Hexa value appears while converting string value to int.

Post by manishrn91 » Fri Sep 09, 2016 6:59 am

Ok, Thanks :)


Regards,
Manish