Infuriating VS2005 Intellisense behaviour

  • Thread starter Thread starter Clive Dixon
  • Start date Start date
C

Clive Dixon

Sometimes when I'm typing the literal 'null', Intellisense decides to
automatically change it to 'Nullable'. Is there any way anyone knows of
stopping it doing this, apart from disabling Intellisense altogether? It's
driving me totally mad.
 
Sometimes when I'm typing the literal 'null', Intellisense decides to
automatically change it to 'Nullable'. Is there any way anyone knows of
stopping it doing this, apart from disabling Intellisense altogether? It's
driving me totally mad.

Are you typing it with a capital N? I'm using VC# 2005 and if I begin
typing null (lowercase n), the first option that intellisense
highlights is null. It only select Nullable if I type a capital N.

Could you give an example of a scenario where you experience this
problem?

Chris
 
Sometimes when I'm typing the literal 'null', Intellisense decides to
automatically change it to 'Nullable'. Is there any way anyone knows of
stopping it doing this, apart from disabling Intellisense altogether? It's
driving me totally mad.

Intellisense will pre-select the most recent entry that matches the
characters you're typing. It seems like you've typed (or more specifically,
completed) "Nullable" more recently than you've completed "null." However,
once you type something that matches exactly, Intellisense will select that
instead, so if you type the entire word "null" (all four characters of it)
then you shouldn't have a problem. This bites me most on "Properties,"
because I have a tendency to type "prop" before trying to autocomplete, so
unless I start it with a capital P I tend to get the prop snippet.

And as that last sentence suggests, Intellisense is fast and loose with
lower-case letters, assuming you just aren't bothering to hit the Shift key,
but if you type a captial letter it assumes (usually rightly) that you're
explicitly looking for a word that starts with a capital.
 
Try typing [DefaultValue(null)].

Chris Dunaway said:
Are you typing it with a capital N? I'm using VC# 2005 and if I begin
typing null (lowercase n), the first option that intellisense
highlights is null. It only select Nullable if I type a capital N.

Could you give an example of a scenario where you experience this
problem?

Chris
 
Jeff,

Not the case. I haven't been using Nullable and I'm not typing capitals.
See my response to Chris's response. Even if I type the entire 'null' in
lower case, Intellisense converts it to Nullable. It's infuriating.
 
Try typing [DefaultValue(null)].


Are you typing it with a capital N? I'm using VC# 2005 and if I begin
typing null (lowercase n), the first option that intellisense
highlights is null. It only select Nullable if I type a capital N.
Could you give an example of a scenario where you experience this
problem?

I still just get null, doesn't change it for me.

Chris
 
Try typing [DefaultValue(null)].

Okay, it appears this is a fringe case. Since the parameters for attributes
must be literals, constants, etc., apparently the IDE filters out other
things like keywords in the Intellisense list. It wasn't simply that
Nullable was selected, but that "null" wasn't in that list at all (for me).
Now I also have CodeRush installed, so I don't know if that's affecting
anything, but I really doubt it.

Not to be condescending, but are you aware that you can type "n-u-l-l" and
then hit Esc to prevent autocompletion?

And I have to wonder: isn't null the default if you don't specify a default?
 
Back
Top