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. Automatically filter intellisense based on context

    Very often when I start to type and the intellisense popup appears the top suggestion is something that wouldn't make sense in the current context. For example, if at the top scope I would type a 'c', I'd expect intellisense to suggest something like "class", but instead it may suggest a variable name which wouldn't make any sense in this context.
    I understand this is complicated, and it would only get more complicated the more fine grained you try to filter this, but it would definitely make intellisense even more useful in my humble opinion.

    1 vote
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  2. runtime, 'go to define' can determine the implementation class

    interface ISome
    {
    void Test();
    }

    class MyClass1: ISome
    {
    public void Test()
    {
    Console.Write("MyClass1");
    }
    }

    class MyClass2 : ISome
    {
    public void Test()
    {
    Console.Write("MyClass2");
    }
    }

    class Test
    {
    public void Run()
    {
    ISome a = new MyClass1();
    ISome b = new MyClass2();
    //while runtime and break at here
    a.Test();//i want press 'F12' go to the define line of 'MyClass1.Test' not ISome
    b.Test();//i want press 'F12' go to the define line of 'MyClass2.Test' not ISome
    }
    }

    0 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  3. Give c# a halfway point between a normal class and a dynamic class

    Allow me do do something like this:

    public dynamic class S
    {
    M();
    }

    ...

    S s = new S();

    s.M();
    s.Foo = "bar";

    Some points to note: s is statically typed to be S (so I get any methods or properties available on that class) - but I marked the class S as dynamic, which means that I also get dynamic symantics - I can just glue the Foo property onto on to the object.

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

    Thanks for taking the time to share this suggestion. This item has been around for a couple of versions of Visual Studio and we haven’t acted on it. Looking at the VS “15” plans, we’re not going to take action on this item, so we’re going to close it. If the suggestion is still relevant, please either take a look to see if there’s another suggestion that’s similar that you can vote on, or open a new suggestion.

    - The Visual Studio Team

  4. string as struct or extension method for IsNullOrEmpty

    In my opinion. string should be a struct which have only pointer and readonly length inside. Empty string should be automatically refer to null

    string should not Nullable. null should be empty string automatically for disambiguous. so string should be struct with default value is Empty

    OK, this is hard and very big impact to system

    So I have another idea to let IsNullOrEmpty be extension method instead of static. Extension method can be used even object is null

    Also other function of string should convert to extension method too. Same reason. And it should treat null string as empty…

    0 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  5. Drop from a specific exception catch to a more generic exception when the first throws and error

    Say you have a method that can throw a couple different exceptions. If it throws a "LoggableException" then I want to handle it by trying to log the error in a certain place. For all other exceptions, I just want to do actions a,b,c. The code would look something like this:

    try
    {
    CanThrowException();
    }
    catch ( LoggableException le )
    {
    Log(le.ToString());
    }
    catch (Exception exp)
    {
    a();
    b();
    c();
    }

    Now, assume that the method "Log(string s)" can also throw an exception. If it does, then we want to do the same actions, a, b, and c that we…

    0 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    6 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  6. Add formatting option "Leave switch cases on single line"

    Similar to the "Leave block on single line" formatting option, Visual Studio should offer the option to keep single-line case labelse.

    I.E, the option NOT TO transform this:
    switch(var)
    {
    case 1: DoSomething(); break;
    case 2: DoSomethingElse(); break;
    }

    into this:
    switch(var)
    {
    case 1:
    DoSomething();
    break;
    case 2:
    DoSomethingElse();
    break;
    }

    0 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  7. Unmanaged type constraint for generic

    Need unmanaged type constraint for generic, so that generic can be usable for unsafe code. It is very useful for interop, read/write binary files (chunk format), game programming (for generic buffer handling), etc.

    The syntax may be something like:
    class Buffer<T> where T : struct, unsafe
    { ... }

    It used to be discussed in:
    http://stackoverflow.com/questions/7551461/c-sharp-generic-constraint-where-is-not-class

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

    Thanks for taking the time to share this suggestion. This item has been around for a couple of versions of Visual Studio and we haven’t acted on it. Looking at the VS “15” plans, we’re not going to take action on this item, so we’re going to close it. If the suggestion is still relevant, please either take a look to see if there’s another suggestion that’s similar that you can vote on, or open a new suggestion.

    - The Visual Studio Team

  8. return ref from property/indexer by inline

    Return ref cannot supported by many reason, even it really need for do messy massive work with struct. reference return is very dangerous is the

    But there are one solution can solve these all problem
    "inline"
    by making property/indexer just dump all get/set code at the place it used without doing any stack push and copy. You then get the direct access to the struct that neatly wrapped in property/indexer but not lose any efficient to copy at runtime

    For the syntax. I propose using "inline" block instead of get/set. Inside the inline block can use "inline return" instead of…

    0 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  9. ref for Linq, IEnumerable and array

    Enumerate and work with a bunch of struct in collection is the very basic work in every kind application. However struct, unlike class, is need to copied and cannot modified so it frustrate us programmer for so long. And return ref is cannot support by many reason

    But for Linq and foreach is another story. When using Linq and foreach we always use it in the safe block so we can use ref at that place

    So we should have another method for IEnumerable like this
    >>> void GetCurrent(Action<ref T> get)
    so you could implement foreach and Linq operation that…

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

    Thanks for taking the time to share this suggestion. This item has been around for a couple of versions of Visual Studio and we haven’t acted on it. Looking at the VS “15” plans, we’re not going to take action on this item, so we’re going to close it. If the suggestion is still relevant, please either take a look to see if there’s another suggestion that’s similar that you can vote on, or open a new suggestion.
    - The Visual Studio Team

  10. Make failure to check for null after an "as" cast a compiler error in C#

    From time to time, I see developers write this:

    var beta = alpha as OtherType;
    beta.DoSomething();

    Various tools can flag a warning about a possible failure to check for null in this situation, but this seems to me to go beyond the usual "failure to check". The use of "as" is an assert that the code *needs* a check for null. If I know that the cast is going to work, then the cast should read:
    var beta = (OtherType)alpha;
    This other style of cast, when I know the type to expect, means that I get different exception messages depending…

    0 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  11. Allow a 'null behaviour' in the ?? operator as an alternative to a 'null value'

    Allow a behaviour as an alternative to a value, when using the null operator. Thus code changes from the following two lines...

    var field = GetFieldOrNull(key);
    if (field == null) continue;

    to the following one line...

    var field = GetFieldOrNull(key) ?? continue;

    Therefore, any of the following would be valid.

    var field = GetFieldOrNull(key) ?? return;
    var field = GetFieldOrNull(key) ?? X();

    where

    void X() { }

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

    Thanks for taking the time to share this suggestion. This item has been around for a couple of versions of Visual Studio and we haven’t acted on it. Looking at the VS “15” plans, we’re not going to take action on this item, so we’re going to close it. If the suggestion is still relevant, please either take a look to see if there’s another suggestion that’s similar that you can vote on, or open a new suggestion.

    - The Visual Studio Team

  12. Generic Pointers

    It would be great to have generic pointers within C#.

    It is quite painful to have the function written for double, byte...

    e.g.

    private Matrix<float> Cast( Matrix<byte> m) {//do the job}
    private Matrix<float> Cast( Matrix<int> m) {//do the job}
    ...

    instead of
    private unsafe Matrix<float> Cast<T>( Matrix<T> m)
    {
    T* mPtr = m.Ptr;

    //do the job
    }

    The CIL and thus CLR itself supports generic pointers. Why would C# also ?

    0 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  13. More type infering in C#

    var list = new List<~>();
    list.Add(10);
    ==> list: List<int>

    This feature exists in modern Java, and in F#. I really miss it in C#.

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

    Thanks for taking the time to share this suggestion. This item has been around for a couple of versions of Visual Studio and we haven’t acted on it. Looking at the VS “15” plans, we’re not going to take action on this item, so we’re going to close it. If the suggestion is still relevant, please either take a look to see if there’s another suggestion that’s similar that you can vote on, or open a new suggestion.

    - The Visual Studio Team

  14. Using the default value "null" with the keyword "params

    If the method is called without arguments, pass value "null", and not an empty array.

    For example:

    public static void Foo(params int[] array)
    { }

    public static void Bar(params int[] array = null)
    { }

    static void Main(string[] args)
    {
    Foo(); // Foo(new int[0]);
    Bar(); // Bar(null);
    }

    0 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  15. Conditional XOR ^^

    Please introduce ^^ Xor operator to the language.

    http://stackoverflow.com/a/14664795/863980

    In bool struct, define an operator ^^ such that:

    public static bool operator^^ (bool right, bool left)
    {
    return right != left';
    }

    Thank you!

    0 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  16. implement compile time expression similar to c++ 11 Constexpr

    C++ 11 offers Constexpr which allows compile time evaluation. It would be a great feature to offer in c#. You don't want the stogey native language to pass you by.

    0 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  17. Make enums easier to enumerate

    At the moment trying to iterate through all the values of an enum is very messy, involving using a static method of the enum class to get the values then cast to a strongly typed array, eg:

    (EnumType[])Enum.GetValues(typeof(EnumType))

    this is very ugly and difficult to read especially when inside a foreach loop. Please make enums easier to enumerate

    0 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  18. Allow generics in extension methods

    Allow generics in extension methods.

    0 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  19. Provide a Function-Style programming in C# and VB.NET as F#

    Provide a Function-Style programming in C# and VB.NET as F#

    0 votes
    Vote
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
  20. value keyword, a readonly version of var

    Would be illegal in a setter as there already is a value.

    Or some other sort of local readonly option.

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

Feedback and Knowledge Base