Click here to Skip to main content
15,884,298 members
Articles / IDE
Tip/Trick

Use Camel-Case and 'Contains' Filtering in Visual Studio 2010's IntelliSense

Rate me:
Please Sign up or sign in to vote.
3.00/5 (3 votes)
9 Aug 2010CPOL 17.2K   2   4
Handy Keyboard Shortcuts in VS2010's IntelliSense
So we all know that if you start typin Object.Property you're going to get an IntelliSense list that is filtered by the first few characters...by the time you type .Pro, you've likely found what you're looking for.

In VS2010 we get a couple of other handy features: Pascal-case filtering and 'contains' filtering.

Pascal-Case Filtering
Members of objects in .NET are typically named with WhatWeLikeToCallThePascalCase convention, where the first letter of every word in a phrase is capitalized.

To activate this type of filtering, say, for an object that is a DataContext, you could type the following:

dc.EQ


This would filter the list down to "ExecuteQuery". Nice!

"Contains Filtering"
In previous versions of Visual Studio IntelliSense was extremely useful if you remembered what the member you were going after started with. Basically, the first few keystrokes filtered the members by the characters they started with.

In VS2010, you can now find all members that match your keystrokes anywhere in the member name. For example, on a DataContext, typing:
dc.dat


...would give you a list of the following members:
DataContext.CreateDatabase
DataContext.DatabaseExists
DataContext.DeleteDatabase


You can see how it doesn't matter that "dat" wasn't capitalized and how dat comes from wherever in the members.

Cheers!

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Canada Canada
For almost 30 years I have been working with computers, learning a myriad of languages and participating in various computing environments.

Though I have been mentoring other developers for the last decade, I have recently found a strong interest in writing and am learning to translate the fun of in-person teaching to something I can get into article form.

I enjoy following technology trends, new gadgets and trying to guess where innovation will lead us next (I'm kinda holding out for a robot-served utopia, but willing to submit to our future robot leaders).

I am a guy who is passionate about my faith, my family and a cure for Juvenile Diabetes (my son lives with this disease).

Comments and Discussions

 
GeneralReason for my vote of 3 ok Pin
Ganesan Senthilvel9-Jan-12 16:26
Ganesan Senthilvel9-Jan-12 16:26 
GeneralRe: Thanks, what is missing that would make this a five? This t... Pin
TheyCallMeMrJames9-Jan-12 18:06
TheyCallMeMrJames9-Jan-12 18:06 
GeneralTo the vote of 1: I'm hoping the things I post here are help... Pin
TheyCallMeMrJames6-May-10 8:21
TheyCallMeMrJames6-May-10 8:21 
GeneralTo the vote of 1 Pin
TheyCallMeMrJames9-Aug-10 11:31
TheyCallMeMrJames9-Aug-10 11:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.