How can I sort Fields, Properties and Methods in Visual Studio?

Viewed 50023

I know that for clarity in codes, I have to write first fields then constructor and then methods etc. But how can I automate it in Visual Studio?

6 Answers

Limited sorting of lines is included with Visual Studio 2022.

To use: select the lines you want to sort and in the top menu click: Edit > Advanced > Sort Lines

Related