C# & Visual Studio Suggestions

C# is an amazing language. Here are some ways I think C#/Visual studio could be improved to write even more beautiful code. Please go vote for the ones you like, or give me feedback on why not. I know this might be too many changes, or provide too much syntatic sugar or noise, so please help choose the best ones! Some suggestions are still missing voting links since I only have 10 votes, and some of the links lead to others suggestions when I found that the suggestion has already been made.

If you want to contact me directly feel free to do so at [email protected] - Jonathan Smars

Visual Studio

Toggle visibility of comments & summary lines

Be able to toggle visibility of full comment lines (//) and summary lines (///) for better code visibility. When these are hidden a one-pixel line in the comment color is shown between the lines. A quick hotkey will toggle all visibility, or hovering over a line will show a tooltip with the comment contents.

Scrollbars to object explorer and better multi dimensional array view

To avoid scrolling forever when looking at big collections. Preferably also a index input box, and the ability to "pin" the whole view so you don't accidentally hover off it when you've found your correct range.

Also a better way to view multi dimensional arrays, possibly a scroll bar for each dimension.

static extension methods

Inherit superclass constructor

A syntax to inherit constructor from base class. For easiest implementation, the ability to right-click menu the class and "implement constructor... " with a list of possible constructors, in the same fashion VS suggests simplifications.

public base myClass(string, bool, int, double)

Resolved related error:

Error CS7036 There is no argument given that corresponds to the required formal parameter 'has' of 'baseClass.baseClass(string, bool, int, double)'

After:

"Power of" operator

Makes for better looking code segments when the power of operator is needed, and for use in constants.
MSDN Quote:
It would be possible to add a power operator to the language, but performing this operation is a fairly rare thing to do in most programs, and it doesn't seem justified to add an operator when calling Math.Pow() is simple.

Before:

After:

if finally

A clause which is run after any of the conditions in an if tree are true. Note: When used with else, the finally clause will only run if any of the other conditions are true. Sort of like an else-else.

Before:

After:

public WindowStyle Style { get; returnsame set; }

One-line summary after line

Allow one-line summaries after the deceleration to conserve lines.
I know this one is a bit different than most people like to organize their code, but I like to keep the amount of lines to a minimum and keep my list of members as readable as possible in the source file itself. While I'd much rather prefer the visibility toggle of comments/summaries, this could be an alternative.