Type question

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.
 
A

Armin Zingler

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
 
S

Scott M.

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
 
G

Gregory A. Beamer

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! |
*******************************************
 
J

Johnny J.

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.
 
J

Johnny J.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top