0

I started my C# journey few months ago with a beginning of a project. Unfortunately, back then I didn't mind implicit private and internal. Now I would like to somehow generate them. I've searched through Visual Studio's and ReSharper's possibilities, no results. My code is pretty large now and I would hate editting it manually.

Is there any option to solve that?

Michał
  • 2,202
  • 2
  • 17
  • 33
  • Why? Is it all public now, and you want to restrict access? Is it a large project? – Silvermind Jan 25 '14 at 19:28
  • No, it is private or internal by default, but I would prefer them to be explicitly stated (reasons: http://stackoverflow.com/a/8479246/2946480). I also make an editor (the program is a game, actually) and it would facilitate conversion of some parts to public (so I can edit them) – Michał Jan 25 '14 at 19:33
  • When everything else fails, find and replace with regular expressions can be very useful. – Paulo Morgado Jan 26 '14 at 21:46

1 Answers1

3

This can be done in Resharper with: ctrl+alt+F and choose full cleanup (more info)

Be sure you you has the following Resharper options checked:

  • Pull down menu: Resharper / Options.
  • Code editing / C# / other
  • Check all boxes under Modifiers.
vahid abdi
  • 9,636
  • 4
  • 29
  • 35
Alex Siepman
  • 2,499
  • 23
  • 31