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?
I think CodeMaid is the best free option for code formatting in Visual Studio.
To sort your file, open the file via solution explorer:
Reorganize Active Document
Alternatively, using the default CodeMaid hotkeys CTRL+M,Z to sort your active file.