Initializing Date w/ Hex

  • Thread starter Thread starter Aeden Jameson
  • Start date Start date
A

Aeden Jameson

I've been browing some of the .Net framework code with reflector and
I notice that defaults values for dates are often initialize with hex.
For
example

new DateTime(0x6da, 1, 1);

Why is that?


Cheers,
Aeden
 
Hi,

The number formatting is based on the settings in Reflector. Under the View
menu you will find Options, selecting this item will present you with a
dialog box which amongst other things has an option called 'Number Format',
the default is 'Auto' but you can force it to always be Hex or Dec.

Keep in mind that Reflector does not necessarily reflect the actual code as
it was written, so the actual source code might have the number as decimal
but the Reflector disassembler chose to represent that in a hex format, the
end result is the same.

Hope this helps.
 
Hi,

The number formatting is based on the settings in Reflector. Under the View
menu you will find Options, selecting this item will present you with a
dialog box which amongst other things has an option called 'Number Format',
the default is 'Auto' but you can force it to always be Hex or Dec.

Keep in mind that Reflector does not necessarily reflect the actual code as
it was written, so the actual source code might have the number as decimal
but the Reflector disassembler chose to represent that in a hex format, the
end result is the same.

Hope this helps.

--
Chris Taylorhttp://taylorza.blogspot.comhttp://dotnetjunkies.com/weblog/chris.taylor









- Show quoted text -

Gotcha. Thank you!
 
Back
Top