Visual Studio
Welcome to the Visual Studio UserVoice site. Let us know what you would like to see in future versions of the Visual Studio suite of products. This site is for suggestions and ideas. If you need to file a bug, visit the Visual Studio Connect site: http://connect.microsoft.com/visualstudio.
ASP.NET Runtime/Web Tooling suggestions have moved! All your ideas, including your votes, have been transferred and are searchable in the ASP.Net Uservoice forum. Please submit any new ASP.NET Runtime/Web Tooling suggestions, or vote on existing suggestions by going to http://aspnet.uservoice.com.
We look forward to hearing from you!
Thanks – Deon Herbert
Visual Studio Team
-
Visual Studio Lightswitch Cosmopolitan Theme
It would be really nice to create Cosmopolitan theme for Lightswitch in Visual Basic
3 votes -
If block with return value
n = If i > 1 Then
........If = 1
....ElseIf j > 1 Then
........If = 2
....ElseIf k > 1 Then
........If = 3
....Else
....If = 0
....End If'Advantages:
' - no redundancy
' - safer code
' - clear purpose
' - good reading
' - good maintaining
' - no need new VB keyword2 votes -
VB slices support
I agree with the idea of Chris M. from C#:
http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2213037-c-slices-supportDim List() As Integer = {1, 3, 3, 7, 8, 9}
Dim Slice() = List(1 To 3)2 votes -
Exception-type list after the Catch keyword
Try
....PossibleException()
Catch aException, bException, cException
....MessageBox.Show("a or b or c ERROR")
End TryIn addition, I'd like to propose a reserved keyword wich can represent the Exception object of the current Try-Catch block for example with the following built-in and hidden declaration:
CurrentException As ExceptionTry
....PossibleException()
Catch aException, bException, cException
....MessageBox.Show(CurrentException.Message)
End Try2 votes -
Intellisence in VB should not suggest Today in dimensioning an array
If you type:
Dim A(0 to
intellisense suggests Today which it selects by default if you press space. I know it can be shortened to Dim A(n) but still....2 votes -
Allow breaking of all lines in VB, at any interval
Just like in the semi-colon languages, however, instead of the semi-colon, we can use 'shift + enter' to indicate a soft line break, just like in Word.
We can use the (↵) symbol to indicate a line break.
2 votes -
Using Between operator in the Select Case statement
Select Case sLastName
....Case "Brown" >< "Lee"....Case Else
End Select
Select Case dteCreate
....Case dte1 >< dte2....Case Else
End Select
Select Case dblX
....Case 0.4 >< 0.5....Case 0.5 =>< 0.6 ' ** for considering **
....Case 0.8 ><= 0.9 ' ** for considering **
....Case Else
End Select
2 votes -
VB Interface Implementation - respecting the order of declaration
When implementing an interface on a class, using VB.NET, the VS2010 and earlier IDE auto-generates the code based on the Interface.
I would like to suggest to have the code generated respecting the order of declaration on the Interface. I usually declare Properties first, Events after and finally the methods. Its a pain having to reorganize my code every time I create a new class and implement an interface. This is specially problematic when we have interfaces with many members.
To work around this issue I usually keep a sample of the interface implementation somewhere so I can just copy…
2 votes -
Excel style array operations
One thing that could be quite neat would be to have a simple syntax for array operations (similar to excel array formulas):
If A and B are two collections of integer, something like
Dim C = {A + B}
Where C would be a collection = to the sum element by element of the collections A and B. With this syntax we should be able to do any operation applicable to the individual datatype. Something like
Dim A() as string = ....
Dim B = {A}.ToUpper.SubString(2) ' B would be an array of string where each element B(i) = A(i).ToUpper.SubString(2) …2 votes -
Functions with a new return way.
' current
Function myCompute(ByVal j As Integer) As Double
myCompute = 3.87 * j
' Disadvanteges:
' - the function name can be confused with a variable name
' - difficult to maintain when function name changed
End Function' current
Function myCompute(ByVal j As Integer) As Double
Return 3.87 * j
' Disadvantege:
' - the Return statement is a jump statement (not structured) like: GoTo or Exit
End Function' proposed
Function myCompute(ByVal j As Integer) As Double
Function = 3.87 * j
' Advanteges:
' - better reading and maintaining
' - not a jump statement
'…2 votes -
Add "Using With" to VB.NET to replace a With block nested inside a Using block
Rather than writing a Using block and placing a With block inside it like this:
Using myObject As New ObjectType
With myObject
.Property1 = Value1
DoSomethingWith(.Property2)
.CallObjectMethod
End With
End Using...it would be nice to write:
Using With myObject As New ObjectType
.Property1 = Value1
DoSomethingWith(.Property2)
.CallObjectMethod
End Using2 votes -
Shared Interfaces and New Casting Operator
A new casting operator that works on type instances as well as types would be very useful and enable scenarios that are not currently available in VB
Casting an Instance of a type to another type would be expanded:
<CastType>Instance
The new casting operator should operate like tryCast (return nothing if the instance is nothing or a casting error is encountered) but it should be able to cast all types, not just classes and structures.Types themselves could be cast into compatible types
<CastType>Type
For example the type myClass implements the Interface myInterface which has a shared memberpublic Interface…
2 votes -
explicitely suggest "Have you forgotten AddressOf operator" on places where a parameter should be a delegate and something is not OK with it
I use delegates sometimes, but not often. And most of times, while looking at C# samples, I forget to use AddressOf operator. That usually brings me a very cryptic message, which means that something is not OK with the address (delegate) of the function I want to be used for a particular purpose and I usually try to fix type of parameters of supplied function etc. before I realize that I should have used AddressOf, This was so much more hard to me when I was a .NET beginner. So, I suggest that the error message - whenever a delegate…
2 votes -
Make the default ByVal specification in VB.NET parameters a configurable option
The default ByVal specification always used to be automatically inserted with method parameters in VB.NET prior to VS2010 SP1. Now the ByVal does not get inserted, which is not a problem since it is the default anyway, but it should be a configurable option. It was simply removed and has caused significant inconvenience for us as we tried to determine what had happened to our VS installations.
2 votes -
"Then" keyword let be optional in the "If" block
"Then" keyword is an error possibility and deceptive in the If block, but it is very useful in a Single-Line If statement.
If i > 100 ' in this line the "Then" keyword is surplus
....If I = 150 Then MsgBox("150") ' but remain required in the Single-Line If statement
End If2 votes -
isnumeric("4.5%") should return True
(and CDbl("4.5%") should return 0.045)
Using a % is a very common user input and should be supported natively2 votes -
Create a new operator for accessing members on objects that may be null
It is a very common problem to have to write code such as...
If Order IsNot Nothing AndAlso Order.Customer IsNot Nothing Then cname = Order.Customer.Name
What would be really useful would be to have a special member access operator that would return Nothing/null when the object that you are accessing is null. eg. if we used the pipe character...
cname = Order|Customer|Name
This would set cname to Nothing if either Order Is Nothing or Order.Customer Is Nothing. If neither of them are, it would return Order.Customer.Name
2 votes -
Add Range and Between trinary operators
After my C# idea, I would like to suggest similar Range and Between ternary operators for the VB.net also:
http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2591768-add-range-operator
http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2591770-add-between-operatorUsing of Range and Between operators:
Dim b As Boolean
b = 5 In 5 To 9 'True
b = 5 In 5 >< 9 'FalseWhy would useful these ternary operators?
The Range and Between operations are used very often but their present usage is not safe:
b = X >= 5 And X <= 9
b = X > 5 And X < 9In both cases, the variable X is used twice what is not safe. …
2 votes -
Try with timeout
It would be great to be able to add a timeout to a try catch. Something in this spirit:
Try WithTimeOut(30s)
' do some long running stuff
return "Stuff done"
Catch(ex as TimeoutException)
return "Timeout after 30 seconds"
Catch(ex as Exception)
return "Some other exception happened"
End TryAnd of course the Return "Stuff done" would stop the timeout.
1 vote -
Add QLike operator to use T-SQL Like operator
The QLike (Query Like) operator should work same way as the Transact-SQL Like operator:
http://msdn.microsoft.com/en-us/library/ms179859.aspxDim b As Boolean
' The following statements return True
b = "A" Like "A"
b = "A" QLike "A"' The following statements return False for Option Compare Binary
' and True for Option Compare Text
b = "A" Like "a"
b = "A" QLike "a"' The following statements return False
b = "A" Like "AAA"
b = "A" QLike "AAA"' The following statements return True
b = "aBBBa" Like "a*a"
b = "aBBBa" QLike "a%a"' The following statements return True …
1 vote
- Don't see your idea?