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

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. 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 →
    • 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 →
          • Generic nullable constraint

            Allow constraining generic type parameter to be nullable (class or Nullable), eg.:

            class Foo<T> where T : null {}

            new Foo<string>(); // compiles
            new Foo<int?>(); // compiles
            new Foo<int>(); // should not compile

            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 →
            • Extension Properties

              Why don't we have a feature called 'Extension properties' in C#? I have seen this feature in other managed languages like F#. Is CLR team is already working on this or no plans yet?

              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 →
              • Allow to use an inherited constructor

                If you inherit from a class you often have to write code where you just create a constructor and call the base class with the same parameters. It would be great, if I could use the constructors of the base class instead.

                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 →
                • C# Feature Request: "Key" Fields in Anonymous Types

                  In VB.NET I'm used to doing things like this when creating anonymous types:

                  Dim prod1 = New With {
                  Key .Name = "paperclips",
                  Key .Price = 1.29,
                  .OnHand = 423
                  }

                  It would be useful for this feature to exist in C#.

                  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 →
                  • To fix Visual C# compiler because is not working on Visual Studio 2012 and Windows 8x64

                    I have been having that problems from a lot of days because I can't reinstall or uninstall it, I have attached some printscreens of the problems because the compiler only works on Windows 7 compatibility and I'm very desperate because I need to finish some works and I can't because C# is not working and I can't do anything to solve the problem, please bring a solution quick and no waiting a lot of months.

                    4 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 →
                    • 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…

                      4 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 →
                      • Automatically generate ArgumentNullException through syntax

                        When coding definsively in a large environment, checking arguments for null is a great help, and appears in many many methods. The procedure for checking for null arguments is always the same, and *it is not refactorable* because it takes the argument's name as a string when constructing the exception.

                        Here is an idea for an easier way to automatically generate null-checks for arguments:
                        public void SomeMethod(Banana arg1 != null, int arg2, object arg3 != null)
                        The ' ARG != null ' syntax would automatically insert a check that is equivalent to
                        if (ARG == null) throw new ArgumentNullException("ARG");

                        This…

                        4 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 →
                        • New scope for object initializers

                          Many times when using classes, I find myself wishing I could set read-only properties in the object initializer block rather than being forced to pass them to the constructor:

                          var myObj = new MyObj
                          {
                          ReadonlyProperty1 = "hello",
                          ReadonlyProperty2 = "world"
                          }

                          This is currently not possible, since you can only make the setter public or mostly inaccessible from whatever scope you're in (even protected is fairly limited). Perhaps you can introduce a special scope modifier "init", which allows an otherwise inaccessible property setter to be visible only in the object initializer block:

                          public class MyObj
                          {
                          public ReadonlyPropery1 {…

                          4 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 the use of mathematical symbols in identifiers

                            When writing algorithms, I try to stay as close to the mathematical definition of an equation as possible.

                            This mostly requires discipline on my part to define, and use, types and operator overloading, not succumb to premature optimization etc. etc.

                            I realized the other day that C# code is stored in UTF-8, which has a lot of mathematical symbols.

                            I would like to be able to write:

                            var sₖ = new Matrix();

                            var sₖᵀ = Matrix.Transpose(sₖ);

                            var c₁= sₖᵀ * sₖ;

                            Interestingly enough, C# already allows you to use non-ascii letters (like European accented characters) in identifiers. This is of…

                            4 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 →
                            • operator .?

                              A cross between the dot operator and the opposite of the ?? operator. "If null, then use null; else, continue with the dot operator."

                              Current code: return a == null ? null : a.b;

                              New code: return a.?b;

                              4 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 →
                              • CacheOption dependency property for Image-control

                                Create dependency property for Image-control concerning the CacheOption so you don't need a custom converter when using a path-to-ImageSourcebinding

                                4 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 a Code Viewer that Doesn't take X Minutes to load

                                  Some times I need to quickly look at a code file and can't wait five minutes for Visual Studio to load on my Six Core Machine. So I open it in NotePad. There really should be a lean C#/C++ what ever quick launch code viewer that launches automatically when I click on a C# File. Visual Studio should only open solutions and projects. Not loose code files.

                                  4 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 class methods/properties/fields to C#

                                    The way static methods/properties are implemented in C# has a number of severe limitations. As they are not associated with the type itself, they cannot be virtual or abstract, and thus cannot be overridden, or inherited in the normal sense. This makes it much ****** to abstract some piece of type-specific functionality into a base type that the children can then provide their implementations of.

                                    Eric Lippert gives a brief description of the feature here:
                                    http://blogs.msdn.com/b/ericlippert/archive/2007/06/14/calling-static-methods-on-type-parameters-is-illegal-part-one.aspx

                                    Example of feature (based on a real-world scenario):
                                    public abstract class Definition<T> where T : Definition
                                    {
                                    public abstract static T GetDefinition();
                                    }

                                    public…

                                    4 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 →
                                    • extend C# to close gaps for high performance native interop

                                      There are several annoying holes in C# interop handling of native types and parametrics.

                                      1) "ref" struct extension methods. Oddly, this is possible in VB.NET:

                                      ' It is possible to change the struct fields, because we have a ref
                                      <Extension()> _
                                      Public Sub SetA(ByRef [me] As FooStruct, newval As Integer)
                                      [me].a = newval
                                      End Sub

                                      We would like to do the same thing in C#. It would be fine if ref extension methods were limited to struct/value types.

                                      2) Take the address of a parametric value type or value-type-array for use in high performance interop:

                                      public unsafe void Foo<T>(T[] data)…

                                      4 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 explicit call of constructor (this or base) in another constructor

                                        Before access to any field of object.
                                        For calculating arguments of constructor and their storing in local variables.

                                        For example:

                                        Before:

                                        public class Foo
                                        {
                                        public Foo(int x, int y) :
                                        this(CalculateFoo(x), CalculateBar(y))
                                        { }

                                        private Foo(string foo, string bar)
                                        { }
                                        }

                                        After:

                                        public class Foo
                                        {
                                        public Foo(int x, int y)
                                        {
                                        var foo = CalculateFoo(x);
                                        var bar = CalculateBar(y);
                                        this(foo, bar);
                                        }

                                        private Foo(string foo, string bar)
                                        { }
                                        }

                                        4 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 additional constraints possibilities for generics.

                                          I would like to have additional keywords for type constraints.

                                          Not sure if it possible but in theory it should at least give compile errors.

                                          - Attribute constraint
                                          where T : new(), [Serializable]

                                          - Or constraint (with shared base class/interface as result)
                                          where T : Int32 | Decimal

                                          - Not constraint
                                          where T : class, new() ! IShouldGiveCompileOrIntellisenseError

                                          4 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 26 27
                                          • Don't see your idea?

                                          Feedback and Knowledge Base