Type question

  • Thread starter Thread starter Johnny J.
  • Start date Start date
J

Johnny J.

I have always wondered (but never bothered to ask) why it doesn't seem like
"DateTime" is a native .NET type.

I mean, you can write code like:

Dim myDate as DateTime

....but when you get to the DateTime part, the type doesn't show up in the
intellisense, and you always have to hit Esc to avoid it being replaced by
"DateTimePicker".

Can anybody explain the reason for this?

Now big deal, I'm just wondering...

Cheers,
Johnny J.
 
Johnny said:
I have always wondered (but never bothered to ask) why it doesn't seem like
"DateTime" is a native .NET type.

I mean, you can write code like:

Dim myDate as DateTime

....but when you get to the DateTime part, the type doesn't show up in the
intellisense, and you always have to hit Esc to avoid it being replaced by
"DateTimePicker".

Can anybody explain the reason for this?

Now big deal, I'm just wondering...

Whenever I type "dim myDate as DateTime", DateTime is also listed. VS 2008 Prof/SP1.
The whole list contains:

DateTime
DateTimeKind
DateTimeOffset
DateTimePicker
DateTimePickerFormat
 
Johnny J. said:
I have always wondered (but never bothered to ask) why it doesn't seem like
"DateTime" is a native .NET type.

I mean, you can write code like:

Dim myDate as DateTime

...but when you get to the DateTime part, the type doesn't show up in the
intellisense, and you always have to hit Esc to avoid it being replaced by
"DateTimePicker".

Can anybody explain the reason for this?

Now big deal, I'm just wondering...

Cheers,
Johnny J.

DateTime always comes up in the intellisense for me. Never heard of it not
coming up like you are experiencing. You might try resetting your
preferences in Tools...Import / Export Settings and try again.

-Scott
 
I have always wondered (but never bothered to ask) why it doesn't seem
like "DateTime" is a native .NET type.

I mean, you can write code like:

Dim myDate as DateTime

...but when you get to the DateTime part, the type doesn't show up in
the intellisense, and you always have to hit Esc to avoid it being
replaced by "DateTimePicker".

Can anybody explain the reason for this?

DateTime does come up in my Intellisense. it might be that you do not have
a "Imports System" statement at the top, so it is not showing up natively.
That is the only reason I can think of.

BTW, Intellisense is SWEET in VS 2010. ;-)

Peace and Grace,


--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
Captain Jack said:
If I type the "Common" tab at the bottom of the Intellisense window,
DateTime is not an option, but if I click the "All" tab, it does show up.
Maybe that's it.
 
That was it - it was hiding in the "All" tab - hadn't noticed the two tabs
before. Still don't understand the purpose of the tabs, though. And isn't
DateTime a common type? Probably comes number 3 on my list of most used
types (after String and Integer)...

Thanks a lot to everybody who took time to answer my question

Cheers,
Johnny J.
 
Back
Top