This Visual Studio extension aligns properties to columns for better readability. To use, select whole lines of c# code and issue the command "AlignCSharpProperties" I recommend adding a keyboard shortcut.
Licensed under Apache licence. https://www.apache.org/licenses/LICENSE-2.0
The nuget package was build with DotNET Framework 4.8.
Lets say you have written the following code:
public int ID { get; set; }
public string Name { get; set; }
public double Amount { get; set; } = 0.0;
public DateTime CreatedAt { get; set; }
The Align command will format your code like this:
public int ID { get; set; }
public string Name { get; set; }
public double Amount { get; set; } = 0.0;
public DateTime CreatedAt { get; set; }
Oliver Abraham, [email protected], https://www.oliver-abraham.de
Please feel free to comment and suggest improvements!
The source code is hosted at: https://github.com/OliverAbraham/VisualStudioCodeAlignment
You'll find this extension on Visual Studio Marketplace. To install:
- open up Visual Studio
- go to 'manage Extensions'
- search for 'VisualStudioCodeReadability' and install
- go to keyboard shortcuts, search for VisualStudioCodeReadability
- assign a shortcut for the desired function
If you find this application useful, buy me a coffee! I would appreciate a small donation on https://www.buymeacoffee.com/oliverabraham