Visual Basic Intellisense Improvements in VS 2008
- Posted: Aug 14, 2007 at 4:14 PM
- 15,877 Views
- 17 Comments
Download
How do I download the videos?
- To download, right click the file type you would like and pick “Save target as…” or “Save link as…”
Why should I download videos from Channel9?
- It's an easy way to save the videos you like locally.
- You can save the videos in order to watch them offline.
- If all you want is to hear the audio, you can download the MP3!
Which version should I choose?
- If you want to view the video on your PC, Xbox or Media Center, download the High Quality WMV file (this is the highest quality version we have available).
- If you'd like a lower bitrate version, to reduce the download time or cost, then choose the Medium Quality WMV file.
- If you have a Zune, WP7, iPhone, iPad, or iPod device, choose the low or medium MP4 file.
- If you just want to hear the audio of the video, choose the MP3 file.
Right click “Save as…”
- Mid Quality WMV (Lo-band, Mobile)
Join Lisa and I as she demonstrates exactly what we can look forward to with Visual Basic Intellisense in Visual Studio 2008!
Comments Closed
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums,
or
Contact Us and let us know.
Follow the Discussion
Thank you for fixing the indentation bug, and the new intellisense looks like just what I need.
Good to see improvement on this nice feature.
At around the 20 min mark they do mention the ctrl-space feature of previous versions, but the fact is you can use that anywhere to kick intellisense into action once you have as little as one character of the variable name typed. I write VB code all day every day at work and I'm hitting ctrl-space like I have a nervous tick! A collegue was watching me type some code recently and noticed that I had intellisense popping up all over the place and I told them about ctrl-space because apparently not all programmers know about it either. It's nice that the Orcas editor pops it up automatically, but it's not such a huge change.
As for keyword completion... the keywords are not that long to type and how bad a programmer would you have to be to not remember the keywords for your language of choice? The help-tips are nice for beginners as well, but I hope there's a way to turn them off.
In VS2005, I have to type the complete variable name -- there is no intellisense showing me previously declared variables. Is there some setting in VS2005 to enable what you are referring to?
You might be right. But if what if you are using different CLR based languages at the same time. You may forget some keyword of each language at any time. For instance I am using C++, VB.NET and C# on different projects. When I use C# for a long time, I can confuse on VB.NET. As this, some time you can confuse while declaring code snippets. Please take a look at property definition on C# and VB.NET they not equal and might be confusing
Yes, as I said in my comment, even going back to 2003 you could use ctrl-space to activate intellisence anywhere.
Try:
Dim aVariable As String
Then type "a" and hit ctrl-space. It's not as neat as what's been shown for orcas because the popup includes every symbol in scope that starts with the letter 'a'. But it will autocomplete when you've typed enough characters to disambiguate. In the example above typing "av" and hitting ctrl-space will complete the variable name because it's the only symbol in scope that starts with "av".
Thanks for the example, it works :O I guess I don't need to upgrade to VS2008 now. J/K .... I can't wait for RTM to try out all the new features and improvements. Thx again.
I'm also not sure I'm too happy with the lack of needing type declarations for variables. What happens when OptionStrict is off, is the type still implied? Its hard enough working on team projects and keeping track of other developers variables but adding on top of that a feature that negates the need for a type is going to make that process even harder. Hopefully that can be turned off as well.
Having tried VS2008 Beta 2 it really is great! Once you try it I am sure you will love it too!
However, I want intellisense to do more. I want there to be more information (from MSDN Libraries if installed). I wand this information to appear in the yellow tooltip that appears over classes when I hover over intellisense box items.
So when I do Dim X as String ( I wand to hover over string in the intellisense box and the tool tip box would have an expandable tree (clickable + sign "more information") that has more information from msdn library about the string class for example. This way I would have the information in my fingertip). so I can see the code comments and if i want more i can click the + sign and it can show me information about the string class from MSDN library in small font or even link to it. Also it would be better if when i click on the links the browser to browse the msdn library would be with in the IDE. (I hate to open too much development windows).
I used the string class as an example. There are some classes that I or others might have not worked with, and its a pain in the you know where, to have to open the MSDN explorer browser and sift through the informaiton. Its too much hassel. Its better to have information in your fingertips as you are coding.
Would this not be cool?
However, the changes in 2008 are more than just the fact that intelliSense now comes up automatically. For one, previous to 2008, intelliSense lists (even when invoked via Ctrl+Space) did not contain keywords. Now they do! ReadOnly, Select, MustInherit, From, SyncLock, etc.
Secondly, 2008 also added more contextual lists. For example, part of the video showed intelliSense at work while typing declarations. For example, typing within an Enum, after the word 'MustInherit', etc. In each of these cases, 2008 shows a filtered list based on what is possible to type at that location according to the VB grammar. Ctrl+Space in previous versions, in comparison, will show you "the world" in all of these contexts.
Thanks,
Lisa
Hi Secret Software,
Thanks for the suggestion. I agree with the principles. We will continue thinking about more ways we can bring "Help" into the IDE. (But in a non-obtrusive way so that those who don't want it, won't get bogged down...)
~ Lisa
Hi VBCoder,
Thanks for contributing your feedback. Can you please provide more info about what exactly made you unhappy?
Thanks!
I agree that some keywords are more useful to show in intelliSense than others. So this is a question we certainly had to consider. However, in the end it felt better to be consistent and show the keywords wherever they could be used. That way there wouldn't be any guessing about when intelliSense should show and when it should not...
When an intelliSense list appears at the beginning of the line, we also follow the principle that wherever an intelliSense list shows, all available options should be included in the list. 'Dim' might not be as useful to get from intelliSense, but 'Console' might be. So we show both.
Please feel free to provide more feedback about how the experience feels once you get a chance to play around with the bits!
Thanks,
Lisa
Hi there,
Option Infer is the option that controls whether or not a type is inferred. Option Strict is independent. Here's a chart to describe how the following line will behave given the various Option combinations:
Dim x = 10
Option Strict Off, Type Inference On -> x is an Integer
Option Strict Off, Type Inference Off -> x is an Object
Option Strict On, Type Inference On -> x is an Integer
Option Strict On, Type Inference Off-> Error: "Option Strict On requires all variable declarations to have an 'As' clause."
Thanks,
Lisa
Remove this comment
Remove this thread
close