I'm using ReSharper and CodeMaid, both have their own organize code option but the problem is that i have no idea how to tell them what is an event and what is a method/function that i coded. If i reorganize code (i want regions) it groups every control event and method together. Is there a way to tell them what is a method and what is an event? or is there another extension that is specifically better for reorganizing code the way i want?I want something like this:private void button1_click(object sender, EventArgs e){}private void MyMethod1(){}private void MyMethod2(){}private void button2_click(object sender, EventArgs e){}to become:#region Eventsprivate void button1_click(object sender, EventArgs e){}private void button2_click(object sender, EventArgs e){}#endregion Events#region Methodsprivate void MyMethod1(){}private void MyMethod2(){}#endregion Methods
Is there a way to sort code properly into regions dividing methods and events?
c#;visual studio
Regions shouldn't be used. Never.If you want to organize methods, properties, fields, events, etc., you may be interested in following StyleCop rules and in making StyleCop checking mandatory during every commit.Also, if you're currently writing code in a basic text editor, you may be interested in moving to Visual Studio, where methods, properties, fields, events, etc. have distinctive icons in Intellisense which make it very easy to recognize visually. Note that Visual Studio Express is free.