Partager via


Does C# intellisense read you mind?

It's cool that VS has intellisense for C# (the feature where in the middle of typing an expression, a little window pops up listing possible things to complete the expression), and that it seems to be very consistently accurate.

I've noticed that it just always seems to do the right thing. It's like it's reading my mind. Things that I've personally noticed and appreciated as a developer:

  1. After a "new" keyword, it defaults to the type of the object being allocated. This is very useful for generic types.
  2. Seems to have some very nice Most-recently-used logic for random usage in the middle of a function.
  3. After the "return" keyword, it default the list to the return type of the method.
  4. After the "override" keyword, it brings up a list of possible methods that could be overriden.
  5. When used while typing in the middle of a parameter list, it checks the method's prototype for likely signature matches.
  6. It even works in the immediate window.

Overall, it just seems to be very well integrated with a lot of different language features and to consistently do what I'd expect it to.

(I'm sure VB is great too; but since I don't really use VB, I can't comment on my personal experience as a VB developer)

Comments

  • Anonymous
    January 10, 2007
    With VS 2005 I felt like the IDE was psychic sometimes with how well Intellisense worked. It's not perfect, but it's a great time-saver (and it also works when you're defining conditional breakpoints!) BTW (plug following) I just finished work on a dynamic proxies assembly: http://www.jasonbock.net/JB/CodeDynamicProxies.aspx The reason I'm mentioning it to you is that I added the feature where I generate an IL file on the fly so I can debug the generated code from Reflection.Emit. This might be of some interest to you :)

  • Anonymous
    January 10, 2007
    One thing I don't like is how it doesn't understand aliased namespaces. e.g. using Gen = System.Collections.Generic; ... Gen.List<T> list = new At this point if you accept the IntelliSense you won't get Gen.List but rather System.Collections.Generic.List :( [)amien

  • Anonymous
    January 11, 2007
    I am starting to pick up C# as a second language right now. I have been VB.NET since Beta 1. The biggest dissapointment with C# and Visual Studio 2005 for me is the lack of Intellisense functionality compared to VB. I think the big reason I went VB back in Beta 1 was the lack of intellisense in the original .NET IDE for C#. Just check out the list of Code Snippets, C# is so weak comapared to VB here. Anyway, I don't mean to slam C#, just venting some frustration a little. :>

  • Anonymous
    January 11, 2007
    Chris, I believe that all (or at least most) of the Code Snippets provided by default for VB in VS2005 are also available for C# from http://msdn2.microsoft.com/en-us/vstudio/aa718338.aspx

  • Anonymous
    January 11, 2007
    Give SharpDevelop (www.sharpdevelop.net) a quick try. You can build it from source really easily if you don't want to install it. The intellisense on that does some things that I wish that Visual Studio's did, such as the following: when you type new, not only does it highlight the default object (as Mike mentioned) but it also filters out the list to only show objects that would make valid C# code. eg Stream s = new ... and the intellisense only shows objects that are derived from the Stream class.

  • Anonymous
    January 11, 2007
    The VS2005 C# intellisense is excellent.  Cyrusn did an interesting blog about it while it was being designed and implemented: http://blogs.msdn.com/cyrusn/ Sadly, he's stopped blogging.

  • Anonymous
    January 11, 2007
    And one that really impressed me is that it knows the next property you are going to use. It seems to look the order of the properties in the object you are using, and if you use two of them consecutively the next time you write a dot, it will automatically go to the point (last property) you worked on. This is amazing when changing 10 or 20 properties in an object

  • Anonymous
    January 12, 2007
    The Intellisense features of VS2005 definitely belong into the list of greatest things since sliced bread. I'd estimate at least 50% productivity improvement over Everett for my day-to-day programming, also partly due to the improved documentation tooltips, as well as refactoring, even though the framework has increased significantly. Especially the signature completion always amazes me. I wish I had more time to look into the Orca's CTP to take Intellisense for a spin around anonymous types.