1

All my code works fine until i did some changes that i cant track right now. when i debugg my code i can see that the converting returning hex instead of number. I have no idea why its happening or what can cause this. any ideas please? Thanks.

the_farmer
  • 649
  • 1
  • 8
  • 23
  • 2
    `0x3`, `03`, and 3 are all the same. – user7116 Aug 04 '12 at 14:10
  • yes I know but i want the number and the reason why it Suddenly returning hex – the_farmer Aug 04 '12 at 14:14
  • What I'm saying is the Framework is not returning anything "in hex". An integer value is an integer value. When displayed as a string it may differ. – user7116 Aug 04 '12 at 14:15
  • possible duplicate of [Visual Studio debugger - Displaying integer values in Hex](http://stackoverflow.com/questions/3354453/visual-studio-debugger-displaying-integer-values-in-hex) – Nasreddine Aug 04 '12 at 14:19

2 Answers2

5

It's a VS feature, You can disable it:

desc

Nasreddine
  • 36,610
  • 17
  • 75
  • 94
2

You're looking at the value in a debugger. Integer values are not stored "in hex" or even "in decimal". 3 is stored in binary, but viewed based on your debugger settings.

You can disable hexadecimal viewing by right clicking in the Watch or Immediate view and deselecting Hexadecimal Display.

Community
  • 1
  • 1
user7116
  • 63,008
  • 17
  • 141
  • 172