Visual Studio 2015

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, you can visit our Developer Community website to get started. 

For suggestions for improvements to other developer products, see these sites:

To review the current UserVoice statuses and their definitions, please review our “What Does the Status of My Feedback Mean?” article.

We look forward to hearing from you!

- The 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 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. REGEX exact match improvement

    Kindly asking you to implement the small improvement to c# regex
    the idea is following
    .{,3} - up to 3 symbols match
    .{3,5} - between 3 to 5 symbols match
    .{3,} - 3 and more
    .{3} - exactly 3 symbols
    I need the next mentioned improvement (!)
    .{3|4|5... etc.} - exactly 3 or 4 or ...

    for instance match like this (.{3}(?:.{2})?) is not pretty useful because when quantity of symbols is 4, the match of 3 symbols is still present!
    I need matches with exactly 3 OR 5 symbols... OR ... etc (if mentioned in mask) and no matches…

    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 →
    • Interactive Window Code Completion with Tab-Tab

      In the Interactive Windows (C#/F#) it would be great to have the Intellisense complete the code block by pressing TAB-TAB like in a normal code editing window.

      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 →
      • Named variable arguments with params Dictionary<string,T>

        C# functions can have variable positional arguments, like this:

        int MyFunction(int arg1, int arg2, params int[] restOfTheArgs)

        You can also give parameters' names at the callsite:

        var x = MyFunction(arg1:42, arg2:99)

        But one thing you can't do, is make variable named arguments, analogous to Python's **kwargs. The 'params' syntax could be straightforwardly generalized to this case, though. It'd be nice to be able to define a constructor like:

        JsonObject(params Dictionary<string,object> keys)

        And call it like:

        new JsonObject(key1: 123, x: "asdf")

        This would also be useful for functions like string.Format - eg, you could write

        string.Format("{greeting}, {who}!", greeting:"Hello", who:"world")

        instead 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…)
          0 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
        • Add TryParse() method for MailAddress object

          Currently the only way to know if an email address is valid is to either create a complex regular expression, or try to add an email address to the MailAddress object, and catch any thrown exceptions.

          I wrote an extension method against the string object to validate if the string is a valid email address.

          public static class MailAddressExtensions
          {
          public static bool IsValidEmail(this string input)
          {
          try
          {
          if (string.IsNullOrWhiteSpace(input))
          return false;
          new MailAddress(input);
          return true;
          }
          catch (FormatException)
          {
          return false;
          }
          }
          }

          Another option would be to implement a method to allow extension methods on an…

          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# Interactive Window DataTips

            It would be very helpful to add DataTips to the C# Interactive Window. When I am dynamically writing/running code in the Interactive Window, I need to be able to inspect the properties of my in-memory variables, just like I do when running a solution in debug mode. Having to use Console.Writeline() to display this information is very inconvenient.

            Thanks,

            John

            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 →
            • Make ToDictionary report the offending key in case of duplicates

              Right now the message we get is "An item with the same key has already been added.".

              I would find it really helpful if it could include the key that it was trying to add.

              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 →
              • Provide internal methods to Interface contracts.

                I'm in the process of rewriting engine code for a game. And something that keeps appearing is the need to describe interfaces with internal methods. Often, game code must build objects that meet an interfaces contract, and that contract often includes the provision of internal methods such as Render().

                C# interfaces currently don't provide this feature, and it's a real shame, because it makes sense to build against these contracts with internal methods, and not having to resort to using inheritance.

                There is no reason a contract can't say 'provide an internal method for Render() because all Models require it…

                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 →
                • repeat keyword

                  working with loop. sometimes you need to repeat something again. in this case you have to reduce/increase the counter or use goto statement.

                  i was thinking that using repeat keyword would be nice.

                  foreach(var v in list)
                  {
                  // do something
                  if(...)
                  {
                  repeat; // iterate and dont go for next element of list.
                  }
                  }

                  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 →
                  • if (var item = someObject as someClass) {...}

                    Combine "is" and "as" - extend "if".

                    instead of
                    if (someObject is Someclass)
                    {
                    var item = someObject as someClass;
                    ....
                    }

                    simplify to
                    if (var item = someObject as SomeClass)
                    {
                    ...
                    }

                    the expression would fail if item is null (i.e. someObject is not someClass).

                    Or use separate keyword for such construct.

                    Possible implementations : treat definition with assignment as expression, or just extend "if" expression syntax.

                    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 →
                    • lazy

                      I would like to see lazy properties in C#. This is a common pattern for me:

                      public class MyClass
                      {
                      public string MyProperty
                      {
                      get
                      {
                      return _MyProperty.Value;
                      }
                      }

                      private System.Lazy<string> _MyProperty = new System.Lazy<string>(() =>
                      {
                      return "Some string";
                      });
                      }

                      This could be simplified with a keyword "lazy":

                      public class MyClass
                      {
                      public lazy string MyProperty
                      {
                      get
                      {
                      return "Some string";
                      }
                      }
                      }

                      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 →
                      • can we remove Tuple object item1 or item2 and puts our custom name

                        its very hard to under stand every time in Tuple like item1 or item2 which one belong to which column or property, menas every time we need remember like on first string datatype is belong to name or id etc.
                        if we can put our custom name for tuple object like we can do in generic list name , id , mobile number etc that we will we very helpfull to understand .

                        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 →
                        • Change keyword "interface" to "spec"

                          As the word "interface" means a place for communication between two entities, a user interface to operate something or the means of connecting something to/with something else, I do not see a logical reason to call a specification or a list of methods and their parameters - an interface.

                          Using "interface" as a keyword to define that list is confusing, especially to begginers. Please change it. Thank you.

                          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 someting select as target one instance of an object

                            add someting like that:
                            with(myPoint)
                            {
                            X=10;
                            Y=10;
                            }

                            that is equivalent to
                            myPoint.X=10;
                            myPoint.Y=10;

                            why wuld it be useful?
                            insted of doing that:
                            Graphics myGraphics= Graphics.FromImage(myImage);
                            using (myGraphics)
                            {
                            myGraphics.DrawLine([...]);
                            myGraphics.DrawLine([...]);
                            myGraphics.DrawLine([...]);
                            myGraphics.DrawRectangle([...]);
                            }

                            you can just do that:
                            using(myGraphics)
                            {
                            with(myGraphics)
                            {
                            DrawLine([...]);
                            DrawLine([...]);
                            DrawLine([...]);
                            DrawRectangle([...]);
                            }
                            }

                            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 →
                            • Extension classes with Interfaces

                              [I have posted this on GitHub as well]

                              I believe that type extensibility (as in extension methods) is a very useful feature that should be viewed as part of a healthy OOP design and not just as compiler deception or syntactic sugar.

                              Type extensibility can be expanded to the much anticipated extension properties, extension events, indexers etc and even Interface implementation. This last one would be particularly useful should we need to group types owned by others, in interfaces owned by us (or others).

                              The main advantage of type extension is the ability to intervene high up in an inheritance…

                              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…)
                                3 comments  ·  Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                              • new language

                                Microsoft did (kind of timeline):
                                1- Use native C++ with version 2, 4, 5, 6
                                2- Develop an interopability standard: COM
                                3- Created a Managed frameWork: .Net
                                4- Created new languages based on .Net: C#, VB, etc.
                                5- Created an extension to C++: C++/CX

                                1- C++ syntax is awfull, complex and error prone
                                2- COM is complex, error prone and using C++/ATL is son complex that no one really want to adhere to that. It was an easy mistake.
                                3- .Net is slow. Can't create object on the stack. Has a garbage collection which make programmer life easy but make…

                                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 →
                                • Add private scope to non nested types to make them only accessbile in same namespace or child namespace

                                  Assemblies addresses the physical separation of code while namespaces addresses the logical separation of code. Types can be scoped to assemblies via the internal keyword but they cannot be scoped to namespace. I propose that non-nested types can be declared private which would make them only accessible within same namespace or child namespaces (even across assemblies).

                                  I have assemblies that contain multiple namespaces because the functionality is always deployed together. This helps me reduce the amount of assemblies which simplifies deployment, patching, speeds up builds, speeds up visual studio, allows ngen to inline etc. However, internal types are insufficient because…

                                  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 "self" keyword, similar to PHP's self:: keyword, for accessing static members.

                                    In C# if you wish to unambiguously reference a static member locally you must specify the full type name, e.g.

                                    class ContrivedName {
                                    static void Foo() {
                                    }

                                    public ContrivedName() {
                                    ContrivedName.Foo();
                                    }
                                    public static ContrivedName Clone(ContrivedName source) {
                                    ContrivedName dolly = new ContribedName();
                                    dolly.CopyFrom( source );
                                    return dolly;
                                    }
                                    }

                                    I find it strange I had to type out "ContrivedName" 3 times in that example. It means I will have to use the Refector-rename functionality should I rename the type to something else, it also makes it more difficult to copy+paste code or other kinds of source-level code reuse.

                                    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 →
                                    • Intellisense for c# conditional compilation symbols

                                      When writing an #if in c# its hard to know what compilation symbols are defined. it would be great if intellisense could list the available ones.

                                      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 →
                                      • var null initialize

                                        I write code like so:

                                        string newFishName = null;

                                        or

                                        var newFishName = (string)null;

                                        because I can't write

                                        var newFishName = String.null;

                                        yet I can write

                                        var newFishName = String.Empty;

                                        I know it's just a syntactic thing, but for consistency

                                        var newFishName = String.null;

                                        might look better?

                                        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 →
                                        • Support "interface" constraint in generics

                                          A new constraint for generics allowing to limit the type parameter to an interface type only:

                                          public class MyClass<T> : T, where T : interface
                                          {
                                          // ...
                                          }

                                          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 →
                                          1 2 8 10 12 25 26
                                          • Don't see your idea?

                                          Feedback and Knowledge Base