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. Methods into enum

    Extend enums with a methods, primary with conversion.
    Example of definition:

    public enum DoorState
    {
    Open,
    Closed,
    Semi-closed;

    public static implicit operator DoorState(string param)
    {
    return (DoorState) Enum.Parse(typeof(DoorState), param);
    }
    }

    Examples of use:

    door1.State = "Closed"; // DoorState.Closed
    dish.Status = "ReadyForEating"; //DishState.Ready
    usercontrol1.Visilibity = false; //Visilibity.Hidden
    service.Status = "Stopped" //ServiceStatus.StopWithHandlers

    3 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 →
    • Asynchronous method execution of Synchronous Method with AutoAsync Attribute

      Async & Await keywords are great but still very much cumbersome to write.

      Here is my suggestion to make it easy without changing existing code.

      Lets consider a simple entity framework example.
      [AutoAsync]
      public Product Fetch ( long a) {
      var product = context.Products.First ( ×=> ×. Product ID == a);
      return product;
      }

      Above code can be converted to asynchronous code by compiler.

      public void FetchAsync( long a, Action<Product> action ) {
      var product ;
      context.Products.FirstAsync( × => x.ProductID == a , r=> {
      product = r;
      action ( product);
      } );
      }

      Compiler needs to know that any…

      3 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 access of private variable in property when using get; & set; using a new C# keyword.

        I think it's not nice to have 10+ private variables being the backend of any property that has a NotifyPropertyChanged() event.

        A new keyword such as "property" can be used to substitute the private variable.

        Observe:

        Before:
        private int a;
        public int A { get { return a; } set { a = value; NotifyProperty("A"); } }

        After:

        public int A { get { return property; } set { property = value; NotifyProperty("A"); } }

        Saves a lot of space no?

        3 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; }
          }

          3 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 →
          • Demote Variable Declarations to Expressions

            Currently a variable declaration is a statement, i.e. it needs to end with a semicolon and has no resulting value. Due to this code such as the following needs to be written:

            MyValue value;
            if (dictionary.TryGetValue(key, out value)) // ...

            I suggest turning it into an expression (that supports being used as a statement), allowing use cases such as:

            if (dictionary.TryGetValue(key, out var value)) // ...
            else // ... by nature 'value' is still defined/assigned even if it makes no sense in this example

            if ((var a = obj as Foo) != null) // ...
            else // ... once again…

            3 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: { ... }
              }

              3 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;

                3 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 →
                • An Static class To check whether a file is an Valid Xml

                  Develop a class to Run a query from sql Script File Directly in to TempDb (SqlCeClient)

                  Ex : Run a Query from a file "payslip.sp" into local database .

                  3 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 type testing as preprocessor directive

                    Currently I have to instruct people to un-comment a #define directive if they also have another set of files in their project. This should be automatic.
                    As discussed here: http://stackoverflow.com/questions/7656001/detecting-if-a-class-type-is-defined-prior-to-compiling

                    For example:
                    #ifType SomeType
                    SomeType.DoSomething();
                    #else
                    DefaultWay.DoSomething();

                    3 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 keyword "owner" form inner class

                      for example:
                      class A{
                      string member;
                      class B{
                      void M(){
                      owner.member="***";
                      }
                      }
                      }

                      3 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 →
                      • Seal all events/properties/methods of a base class

                        I would like to see the sealed modifer being used to seal a base-class in the context of its sub-class

                        public abstract class MyFrameWorkUserControl : sealed UserControl

                        I want the users of my framework user control to follow the coding-guidelines in MyFrameworkUserControl's protected virtual or abstract methods/properties/events and not override anything in UserControl.

                        Properties/events/Methods in UserControl will not be sealed for MyFrameworkUserControl, but it wll be sealed for those who inherits from MyFrameworkUserControl.

                        I could manually seal every UserControl method and/or property in MyFrameworkUserControl, but the proposed construct would make things easier.

                        3 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 →
                        • I wish to have C# look and feel for desktop application for designing more realistic desktop application.

                          Java programming language having a look and feel property for swings like the same i want to use look and feel properties in c# form that we can give new look and feel to our application on each time.

                          3 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 →
                          • Support nullable types in attributes

                            Support nullable types in attributes

                            3 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 →
                            • ability to use yield return/break notation inside any function that returns an IList<T>, not just IEnumerable<T>

                              I find it tedious to have to define a "var result = new List<T>" every time I want to write a function that returns an IList<T>. It would be nice to be able to do something like "return append <value>" and never have to define the list variable.

                              3 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 →
                              • Add dynamic<T> to the DLR

                                Extend the DLR with a dynamic<T> type. This would let you specify the type that members would be, but leave what members exist as dynamic. It would allow compile time checks on everything except member names and would be very useful if you had something like a Dictionary<string,Guid> as you're member names would match against the string, but the compiler would know you were returning a Guid.

                                3 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 →
                                • Provide break on a custom condition

                                  Provide the option to break on a custom condition. For example if you have a loop that executes code a certain amount of times and seems to be failing on the 10th loop only, then set the break point to break at the 10th loop as opposed to having it break on the first. This would save alot of time in programs where exceptions are being thrown with in loops.

                                  3 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 →
                                  • Add a shorthand operator to the C# compiler for Lazy<T> similar to Nullable<T>.

                                    Add a shorthand operator to the C# compiler for Lazy<T> similar to Nullable<T>.

                                    Back In .NET 2.0, Nullable<T> was given the shorthand operator ? to be able to declare a nullable variable. This makes it easier to read than the generic version:

                                    Nullable<int> customerId;
                                    vs
                                    int? customerId;

                                    The Lazy<T> class in .NET 4 is great; however, the declaration of variables starts to loose readability:

                                    Lazy<BindingList<string>> customerNames;
                                    Lazy<int> customerId
                                    vs something like
                                    BindingList<string>~ customerNames;
                                    int~ customerId;

                                    3 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# as a Browser Scripting Language

                                      C# can be incorporated a new Scripting language.
                                      No need to have CLR. Just all the syntax.
                                      This will help all the developers to use same syntax for server side and browser side scripting. To be a scripting language, one important feature is required, that is all objects should be dynamic.

                                      OOPS & branching and looping, delegates all are very much required for us to create a robust browser coding.

                                      3 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?

                                        3 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 →
                                        • Scope of property field restricted to getter and setter

                                          Say you have isDirty field and a IsDirty property on a form

                                          bool isDirty = false;
                                          bool IsDirty
                                          {
                                          get { return isDirty; }
                                          set
                                          {
                                          this.commandBarButtonSave.Enabled = value;
                                          isDirty = value;
                                          }
                                          }

                                          Nothing prevents a developer from assigning the field, and then not setting the button state, even though the only way it is ment to be accessed is through the property.

                                          Something like the code below would be nice

                                          bool IsDirty
                                          {
                                          get;
                                          set
                                          {
                                          this.commandBarButtonSave.Enabled = value;
                                          impl = value;
                                          }
                                          }

                                          impl would then be a key word accessing the actual field

                                          3 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 →
                                          • Don't see your idea?

                                          Feedback and Knowledge Base