Click here to Skip to main content
Click here to Skip to main content

Tagged as

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

, 9 Aug 2010 CPOL
Rate this:
Please Sign up or sign in to vote.
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)

Share

About the Author

TheyCallMeMrJames
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 PinmemberGanesanSenthilvel9-Jan-12 17:26 
GeneralRe: Thanks, what is missing that would make this a five? This t... PinmemberTheyCallMeMrJames9-Jan-12 19:06 
GeneralTo the vote of 1: I'm hoping the things I post here are help... PinmemberTheyCallMeMrJames6-May-10 9:21 
GeneralTo the vote of 1 PinmemberTheyCallMeMrJames9-Aug-10 12:31 

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

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

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.141220.1 | Last Updated 9 Aug 2010
Article Copyright 2010 by TheyCallMeMrJames
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid