How big can a class be

A class should be so small that anyone can easily understand it. If a method is not required to be understood in order to understand the class, then that method probably doesn’t belong in there and it’s not part of the responsibility of that class.

It is not a good idea to judge how big a class is based on the number of lines of code, however the following list can give you a rough estimate:

  • Less than 100: Ideal
  • 100 to 200: Ok
  • 200 to 300: Warning
  • 300+: The class is too big
Advertisements

Identify the IIS App Pool associated with a w3wp process

When there are multiple app pools running, you see more than one w3wp.exe in the list of processes you want to attach to. The following command helps to find the process associated with your app pool:

%systemroot%\system32\inetsrv\APPCMD  LIST WP

Appcmd