Re: Some potential language ideas for future versions of VB
Posted 10 February 2014 - 02:32 PM
One thing that I keep wanting the ability to do is to be able to type Option <Strict|Explicit|Infer> <Off|On> and Imports <NameSpace>.<NameSpace>.... wherever I'm at in my code window and press enter and have it move those to the top of the code window where they belong. I know this sounds trivial but since this is where Option and Imports need to go, why not allow you to type your Option or Import statement on a line and press enter and it magically appear before the class?
I know I can click the Error Correct Option dropdown and apply the fix but I just think it would be nice to:
Dim con as New SqlConnection("SomeConnectionString")
'get the squiggly line but instead of grabbing the mouse and applying the fix, just type Imports System.Data.SqlClient <Enter>
and that get's moved to the top of the code.
I do however like the idea of having the ability to do implicit line continuation on strings. I get so use to the line continuation that I forget when typing a long string that I have to follow another method to continue a string.