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

Terms of Service and Privacy Policy

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 vote and comment on it.

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

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

  • Hot ideas
  • Top ideas
  • New ideas
  1. Make inline if(?) without else

    As you know many of developers use inline if, and there are many cases when really we need only one case. For example we write
    textBlock1.Text = textBlock1.Text.Lenght > 20 ? textBlock1.Text.Substring(0,20) : textBlock1.Text;
    But, we can simply write
    textBlock1.Text = textBlock1.Text.Lenght > 20 ? textBlock1.Text.Substring(0,20);

    6 votes
    Vote
    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      You have left! (?) (thinking…)
      1 comment  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
    • Support field-targeted attributes on auto-properties

      I would like to see C# support using field-targeted attributes on auto-properties where the compiler applies said attribute to the generated backing field. This functionality has precedent in that the compiler already behaves like this for such attributes applied towards events:

      // This works in all versions of C#
      [field: NonSerialized]
      public event EventHandler SomeEvent;

      // This will not compile
      [field: NonSerialized]
      public string SomeProperty { get; set; }

      // This seems unnecessary
      [NonSerialized]
      private string _someOtherProperty;
      public string SomeOtherProperty {
      get { return _someOtherProperty; }
      set { _someOtherProperty = value; }
      }

      6 votes
      Vote
      Sign in
      Check!
      (thinking…)
      Reset
      or sign in with
      • facebook
      • google
        Password icon
        I agree to the terms of service
        Signed in as (Sign out)
        You have left! (?) (thinking…)
        0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
      • Make LINQ query syntax as expressive as extension method syntax

        LINQ query syntax lacks a lot of features that exist in extension method syntax, such as .Single(), .First(), .Distinct(), .Average(), ...

        I.e.:

        var col =
        from cust in customers
        where cust.ID == 5
        select first cust;

        6 votes
        Vote
        Sign in
        Check!
        (thinking…)
        Reset
        or sign in with
        • facebook
        • google
          Password icon
          I agree to the terms of service
          Signed in as (Sign out)
          You have left! (?) (thinking…)
          0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
        • Easier Immutable Classes (case classes)

          I often find myself writing immutable business objects (objects with no logic, only data). For example, EventArgs and Exception classes. Here is one I wrote today:

          public class SelectedMazeChangedArgs : EventArgs
          {
          public Maze PreviousMaze { get; private set; }
          public Maze SelectedMaze { get; private set; }
          public SelectedMazeChangedArgs(Maze previousMaze, Maze selectedMaze)
          {
          PreviousMaze = previousMaze;
          SelectedMaze = selectedMaze;
          }
          }

          This is what that same class would look like in Scala:

          case class SelectedMazeChangedArgs(Maze PreviousMaze, Maze SelectedMaze) extends EventArgs

          As a bonus, Scala also automatically overrides .equals() and .hashCode() for you.

          When you write a lot of EventArgs…

          6 votes
          Vote
          Sign in
          Check!
          (thinking…)
          Reset
          or sign in with
          • facebook
          • google
            Password icon
            I agree to the terms of service
            Signed in as (Sign out)
            You have left! (?) (thinking…)
            0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
          • Create a 'DisableDefaultMouseOverEffect' Property for WPF Buttons

            Search Google or Bing for: "WPF Disable Default Button Mouseover Effect" and there hundreds of posts about how to disable the default mouse over effect.

            Everyone of the answers involve creating custom templates, overriding styles and lots of work, to do what should be optional.

            Collectively I would bet the WPF developers have wasted over 100,000 hours on this problem alone.

            I do not prefer WPF, but if I have to use it, please make it a productive experience.

            6 votes
            Vote
            Sign in
            Check!
            (thinking…)
            Reset
            or sign in with
            • facebook
            • google
              Password icon
              I agree to the terms of service
              Signed in as (Sign out)
              You have left! (?) (thinking…)
              0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
            • Integrate PHP language with PDO extension for MySQL.

              There should be ability to use the online powerful PHP functions inside any C# application, as PHP is nowadays is very advanced and reliable language for online processes (server side)... and let other functions (C# functions) to care about the offline properties (local side)...
              PHP Check for files online, get values, also in logging in/out for online applications, and sure the most important point in integrating PHP language inside C# applications is to have PDO extension to connect to the online MySQL databases and function with them.

              6 votes
              Vote
              Sign in
              Check!
              (thinking…)
              Reset
              or sign in with
              • facebook
              • google
                Password icon
                I agree to the terms of service
                Signed in as (Sign out)
                You have left! (?) (thinking…)
                0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
              • Screenshot function support for Windows Phone in ACTUAL device

                Why Windows Phone only support screenshot funtion in emulator only?? That's really odd. When user wants to report a bugs to developer and wanna show actual screen shot, do they have to being a camera and take actual photo?? It would be really good when they have a screen shot function, so when user has noticed there is bugs, make them report to developers directly via outlook app in windows phone

                6 votes
                Vote
                Sign in
                Check!
                (thinking…)
                Reset
                or sign in with
                • facebook
                • google
                  Password icon
                  I agree to the terms of service
                  Signed in as (Sign out)
                  You have left! (?) (thinking…)
                  1 comment  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                • Add ?! as an enhanced Property Chainging Coalesce operator

                  This is not a new idea, but just a refinement of other like requests.

                  The scenario is if any object in a property chain is null, then short circuit the evaluation return null from the chain and allow a possible default.

                  eg.
                  myObj.Field.ItemList[3].Address.Postcode ?! "0000";

                  This I see has less change, overhead and eye fatigue than the other common proposal of ?.

                  myObj?.Field?.ItemList?.[3]?.Address?.Postcode ?? "0000";

                  This also must allow the following:

                  return myObj.Field.ItemList[3].Address.Postcode ?! null;

                  6 votes
                  Vote
                  Sign in
                  Check!
                  (thinking…)
                  Reset
                  or sign in with
                  • facebook
                  • google
                    Password icon
                    I agree to the terms of service
                    Signed in as (Sign out)
                    You have left! (?) (thinking…)
                    0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                  • Allow Indexers as extension methods

                    It would be very handy to be able to define indexers as extension methods in C#.

                    6 votes
                    Vote
                    Sign in
                    Check!
                    (thinking…)
                    Reset
                    or sign in with
                    • facebook
                    • google
                      Password icon
                      I agree to the terms of service
                      Signed in as (Sign out)
                      You have left! (?) (thinking…)
                      1 comment  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                    • short suffix for number

                      Add suffix for short and byte for numbers in the language. For example being able to specify

                      5US or 5S
                      much like 5UL, 5U, 5L can be.

                      instead of
                      (UInt16)5 or (ushort)5
                      like must be done today

                      6 votes
                      Vote
                      Sign in
                      Check!
                      (thinking…)
                      Reset
                      or sign in with
                      • facebook
                      • google
                        Password icon
                        I agree to the terms of service
                        Signed in as (Sign out)
                        You have left! (?) (thinking…)
                        1 comment  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                      • Named anonymous types

                        Anonymous types can only be used within the scope where it is created. Sometimes you want to pass the intermediate result to another function for further processing. Unfortunately, this isn't possible, because the anonymous type has no name and cannot be declared.

                        C# does create an internal type under the hood, which has only read-only properties. It would be great to give the type a name, so it can be used outside its scope. The following statement creates an anonymous type:

                        var x = new { Id = id, Name = name };

                        Suppose you want to pass this object…

                        5 votes
                        Vote
                        Sign in
                        Check!
                        (thinking…)
                        Reset
                        or sign in with
                        • facebook
                        • google
                          Password icon
                          I agree to the terms of service
                          Signed in as (Sign out)
                          You have left! (?) (thinking…)
                          1 comment  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                        • C# Regex Literals - Seamless Regular Expression integration with .NET Framework and C# Language Grammar

                          Create a seamless integration of the .NET library code base and language grammar with regular expressions, through new methods signatures and the lexical definition of regex literals.

                          I want to able to write regex literals like:

                          /[a-z]/cim // standing for new Regex("a-z", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Multiline)

                          I want to be able to write the following code:

                          Instead of: "some string".Split(new char[] { ' ', '*' })

                          It could be: "some string".Split(/[\s\*]/)

                          And the same could work for Replace(), IndexOf(), Substring() and so on.

                          Especially for replacing scenarios, a especial 'g' flag (or 'a') would mean global/all matches, for replacing…

                          5 votes
                          Vote
                          Sign in
                          Check!
                          (thinking…)
                          Reset
                          or sign in with
                          • facebook
                          • google
                            Password icon
                            I agree to the terms of service
                            Signed in as (Sign out)
                            You have left! (?) (thinking…)
                            0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                          • Add more informations if WCF services client generation failed

                            If the service client generation failed and the reference.cs is empty I dont get correct information about the error in VS
                            If I set logging in config file in the most cases I find the description of the problem in the log file but it is too cumbersome...

                            5 votes
                            Vote
                            Sign in
                            Check!
                            (thinking…)
                            Reset
                            or sign in with
                            • facebook
                            • google
                              Password icon
                              I agree to the terms of service
                              Signed in as (Sign out)
                              You have left! (?) (thinking…)
                              0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                            • Add support for generic operators

                              C++ and the CLI currently support generic operators, C# does not and can't use them.

                              5 votes
                              Vote
                              Sign in
                              Check!
                              (thinking…)
                              Reset
                              or sign in with
                              • facebook
                              • google
                                Password icon
                                I agree to the terms of service
                                Signed in as (Sign out)
                                You have left! (?) (thinking…)
                                1 comment  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                              • Second syntax of the switch statement

                                double mydouble, dblA, dblFrom, dblTo;
                                <code>
                                switch(mydouble)
                                {
                                ....case(dblA, dblFrom .. dblTo)
                                ....{
                                ........Console.WriteLine("variable or variable range");
                                ....}
                                ....case(5.7 >< 8.3)
                                ....{
                                ........Console.WriteLine("between");
                                ....}
                                ....default
                                ....{
                                ........Console.WriteLine("default");
                                ....}
                                }

                                - there is no fall through of course but there are branches
                                - each branch of a block{} or a single statement (like the if)
                                - variables can be used (not only constants)
                                - range and between operators can be used (frequent testing)
                                - comfortable, comma-separated expression lists for the cases
                                - the new syntax fits into the C# style (see try-catch, if)
                                - do not need new C# keyword
                                -…

                                5 votes
                                Vote
                                Sign in
                                Check!
                                (thinking…)
                                Reset
                                or sign in with
                                • facebook
                                • google
                                  Password icon
                                  I agree to the terms of service
                                  Signed in as (Sign out)
                                  You have left! (?) (thinking…)
                                  3 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                                • Allow the C# 'break' statement to terminate *several* nested enslosing loops, rather than the closest one only

                                  Sometimes, I want to exit several nested loops, based on a single condition.

                                  Today, I have to introduce an additional boolean variable, to exit all the other loops except the innermost one. This is inconvenient.

                                  If only the 'break' statement could have accepted the number of loops to break...

                                  A straighforward example:
                                  for(;;)
                                  {
                                  for(;;)
                                  {
                                  if{true} break(2);
                                  }
                                  }

                                  This feature would work just similarly when used in a 'switch' statement.

                                  We would only have to be concerned to not allow the 'break's parameter to exceed the number of nested scopes it is used from within. Otherwise, an error…

                                  5 votes
                                  Vote
                                  Sign in
                                  Check!
                                  (thinking…)
                                  Reset
                                  or sign in with
                                  • facebook
                                  • google
                                    Password icon
                                    I agree to the terms of service
                                    Signed in as (Sign out)
                                    You have left! (?) (thinking…)
                                    2 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                                  • do...returning block

                                    Create a new block structure called do..returning. Works like a using() block.

                                    The purpose of the block is to intercept the return value of a method and do something with it (even change it) before actually returning.

                                    For example:

                                    do
                                    {
                                    // get x from somwhere

                                    if (x == 1)
                                    return "One";
                                    else if (x == 2)
                                    return "Two";
                                    else if (x == 3)
                                    return "Three";
                                    else
                                    return x * 10;

                                    }
                                    returning (string x)
                                    {
                                    return "X is " + x;
                                    }
                                    returning (int x)
                                    {
                                    return "X is " + x;
                                    }
                                    returning (object x)
                                    {
                                    return "something…

                                    5 votes
                                    Vote
                                    Sign in
                                    Check!
                                    (thinking…)
                                    Reset
                                    or sign in with
                                    • facebook
                                    • google
                                      Password icon
                                      I agree to the terms of service
                                      Signed in as (Sign out)
                                      You have left! (?) (thinking…)
                                      0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                                    • Create supporting auto notify properties, like this:

                                      Create supporting auto notify properties, like this:

                                      public string Data { get; set; notify; }
                                      public string ID
                                      {
                                      get;
                                      set;
                                      notify: { ... }
                                      }

                                      5 votes
                                      Vote
                                      Sign in
                                      Check!
                                      (thinking…)
                                      Reset
                                      or sign in with
                                      • facebook
                                      • google
                                        Password icon
                                        I agree to the terms of service
                                        Signed in as (Sign out)
                                        You have left! (?) (thinking…)
                                        0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                                      • Inline hint attribute for c# methods

                                        The C++ the "inline" declaration could be made available as an attribute in .Net languages. This hasn't been done on the grounds that the compiler knows best, but there are situations when it doesn't. In my code, I might break up a method in to smaller methods to aid readability. These methods may only be called from a single call site in the whole application, so in the generated code it makes sense to inline them, especially if they are called in a many-iterations loop.

                                        For example:

                                        class MyClass
                                        {
                                        [inline]
                                        private void DoComplicatedStuff1() { ... }

                                        [inline]
                                        private void…

                                        5 votes
                                        Vote
                                        Sign in
                                        Check!
                                        (thinking…)
                                        Reset
                                        or sign in with
                                        • facebook
                                        • google
                                          Password icon
                                          I agree to the terms of service
                                          Signed in as (Sign out)
                                          You have left! (?) (thinking…)
                                          2 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                                        • 5 votes
                                          Vote
                                          Sign in
                                          Check!
                                          (thinking…)
                                          Reset
                                          or sign in with
                                          • facebook
                                          • google
                                            Password icon
                                            I agree to the terms of service
                                            Signed in as (Sign out)
                                            You have left! (?) (thinking…)
                                            0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                                          1 2 9 11 13 29 30
                                          • Don't see your idea?

                                          Feedback and Knowledge Base