Visual Studio IDE

Announcement: Last fall, we migrated this forum to Visual Studio Developer Community to provide you one convenient and responsive system for all feedback. As the final step in the migration, this forum will be closed off completely on June 1st, 2019. We encourage you to visit Visual Studio Developer Community where you can now suggest new ideas, browse and vote on existing ideas, and engage with Visual Studio teams.

We’d like your suggestions and ideas to help us continuously improve future releases of Visual Studio, so we’ve partnered with UserVoice, a third-party service, to collect your feedback. Please do not send any novel or patentable ideas, copyrighted materials, samples or demos for which you do not want to grant a license to Microsoft.

This site is for feature suggestions; if you need to file a bug, you can visit our Developer Community website to get started.

Note: your use of the portal and your submission is subject to the UserVoice Terms of Service & Privacy Policy and license terms.

We look forward to hearing from you!
- The Visual Studio Team

I suggest you ...

You've used all your votes and won't be able to post a new idea, but you can still search and comment on existing ideas.

There are two ways to get more votes:

  • When an admin closes an idea you've voted on, you'll get your votes back from that idea.
  • You can remove your votes from an open idea you support.
  • To see ideas you have already voted on, select the "My feedback" filter and select "My open ideas".
(thinking…)

Enter your idea and we'll search to see if someone has already suggested it.

If a similar idea already exists, you can support and comment on it.

If it doesn't exist, you can post your idea so others can support it.

Enter your idea and we'll search to see if someone has already suggested it.

  • Hot ideas
  • Top ideas
  • New ideas
  • My feedback
  1. allow properties for out and ref parameters

    Allow properties in ref and out parameters.

    Example:

    public MyNumber { get; set; }

    public void MyTest()
    {
    Increase(ref MyNumber);
    }

    private void Increase(ref int number)
    {
    number++;
    }

    1 vote
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  2. Make it easier to develop "Hello World"

    The standard install should include everything someone needs to develop a "Hello World" app with ease.

    1 vote
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  3. 單元測試, 可否顯示錯誤的行數?

    顯示:
    Message: Assert.AreEqual 失敗。 預期: <268>。實際: <0>。

    Assert.AreEqual(x1, 0);
    Assert.AreEqual(x2, 0);
    ...
    可否顯示錯誤的行數, 讓使用者知道x2這一行錯誤

    1 vote
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  4. Copyable type names in method signature tooltips

    When a method signature is shown in a tooltip (for example when entering parameters for a method), allow the user to select and copy type names from the tooltip. This would be useful for pre-assigning values to parameters that have long type names.

    1 vote
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  5. 3 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  6. Inline If syntax

    Say you have a variable---

    var myVar = null;

    C# will throw an error. You must initialize implicitly typed variables, and you cannot assign null to an implicitly typed variable.

    But if you say---

    var myVar = ( myCond ? "simple string result" : null );

    and you step through the code, you can add a watch, force the cond to evaluate to false, and the conditional assigns null to the implicit variable.

    Am I missing a nuance here? Should this be possible? Is this a bug or a feature?

    1 vote
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  7. Block Attributes

    Can we have a syntax where we could group commonly used Attributes, like this:
    [Required]
    {
    public string One { get; set; }
    public string Two { get; set; }
    public string Three { get; set; }
    }

    instead of writing:
    [Required]
    public string One { get; set; }
    [Required]
    public string Two { get; set; }
    [Required]
    public string Three { get; set; }

    3 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  8. fullnameof() - a variation of nameof()

    Id like to see a variation of nameof() named fullnameof() to shorten code such as this:
    ModelState.AddModelError($"{nameof(model.WorkInstruction)}.{nameof(model.WorkInstruction.ReasonCodeID)}", "The Reason Code field is required.");

    to:
    ModelState.AddModelError($"{fullnameof(model.WorkInstruction.ReasonCodeID)}", "The Reason Code field is required.");

    1 vote
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  9. allow classes to access their nested classes private members

    IGlobalDockElement : IToolDisplay, IDockablePanel

    Imagine the following:

    class A
    {
    private int foo;

    public class B
    {
    private A owner;
    private int bar;

    public B (A ownerA) { this.owner = ownerA; }

    public int Add () { return this.owner.foo + this.owner.bar; }
    }
    }

    Currently, in c#, an instance of B could access foo, as seen in Add method:

    A owner = new A();
    A.B nested = new A.B(owner);
    nested.Add(); <-- this function access private A member foo

    However, the reverse is *not* possible, an instance of A can not access a private member from an instance of B.

    I…

    3 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  10. Add unreachable code warning when comparing non-nullable type variables to null

    This suggestion is migrated to Developer Community. Please use below link to view the current status.
    https://developercommunity.visualstudio.com/content/idea/351685/add-unreachable-code-warning-when-comparing-non-nu.html
    The C# linter (or whatever it's called) should warn the programmer of an unreachable code if they try to compare a non-nullable type variable to null.

    After all, it's a non-nullable type, which means that it can never reference to null, isn't that right?

    Example:

    if (new Point(0, 0) == null) MessageBox.Show("Hello World!");

    2 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  11. Restrict the public access level to only specific classes

    This could count as well for class, properties , constructor or methods.
    Like in C++ we have the friend reserved word we could have something similar that would allow public members or objects to be accessible only to specific class. The objects that would have access could be a parameter of the reserved word:

    public( <class name>[, <class name 2>]* )

    1 vote
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  12. 1 vote
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  13. python extension.

    Code will be written in python wih the help of an extension.

    3 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  14. Allow simple formatting in comments

    Allow simple formatting such as bold and italic in comments so that certain parts of a code file can be highlighted.

    2 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  15. add "<-" operator for TaskCompletionSource.SetResult

    old way: ((TaskCompletionSource)x).SetResult(value)
    new way: x <- value

    would be cool to have a new short operator to set the async result.

    #region ego.MODEL <- android.os.Build.MODEL;
    //ego.MODEL = android.os.Build.MODEL;
    // when can we have the new operators in C# ?
    ego.MODEL.SetResult(android.os.Build.MODEL);
    #endregion

    1 vote
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  16. Ranged Data Types In C#

    I suggest to improve current numeric types by adding a way to set a value range. This can be done by some attributes, but it will be easier to give it a syntax like this
    C#:
    [5,10]int i;
    VB.NET:
    Dim i As Integer[5,10]
    The compiler must not allow I to have any value < 5 or >10.
    One can omit one limit:
    [,100]byte
    [13,]int
    This will make it easy to write auto-properties like this:
    C#:
    [18,30]int Age {get; set;};
    VB.NET:
    Property Age As Integer[18,30]

    Another Syntax Suggestion:
    C#:
    <5,10>int i;
    VB.NET:
    Dim i As Integer<5,10>

    36 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    6 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  17. Why is C# code so long and so long...Why not be as concise and short as python and C

    Why is C# code so long and so long...Why not be as concise and short as python and C

    1 vote
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  18. Dear Microsoft, why doesn't your C# go beyond C/C++ and support us to develop a software like PS,COREDDRAW and CAD with C/C++?Powerful. If y

    Dear Microsoft, why doesn't your C# go beyond C/C++ and support us to develop a software like PS,COREDDRAW and CAD with C/C++?Powerful. If you say that c # can do, why don't you persuade them to use c # development of Adobe, Corel, CAD, UG, PRE production softwares 3 dmax...

    1 vote
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  19. Add a lock expression (inlined lock)

    The locking syntax can be very bulky since it is only available as a statement.

    The checked/unchecked keywords in contrast can be used both as a statement and in an expression context:

    unchecked { return a + b; }
    return unchecked(a + b);

    I would greatly appreciate a similar mechanism for the lock statement, since it would allow to remove a lot of useless clutter in thread-safe code.
    Nowadays, whenever you need to lock within a property accessor, you are unable to use an expression body:

    public object SomeProperty {
    get {
    lock(_lock) return GetValue();
    }
    }

    I realize the…

    1 vote
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  20. Enhance Assignment if null

    This seems a bit verbose:
    if (values == null) values = new List<string>();

    And this seems too redundant:
    values = values ?? new List<string>();

    My suggestion would be to implement a ?= operator and do it like this
    values ?= new List<string>();

    0 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: facebook google
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →

Feedback and Knowledge Base