c# - Why is the FilterConfig class not static? -


when create new asp.net mvc project defaults, filterconfig class ( , others ) this;

namespace nop.web {     public class filterconfig     {         public static void registerglobalfilters(globalfiltercollection filters)         {             filters.add(new handleerrorattribute());         }     } } 

and it's usage ( under globalasax > application_start )

protected void application_start() {     //...     filterconfig.registerglobalfilters(globalfilters.filters);     //... 

so why filterconfig class not static ? should this;

public static class filterconfig {     public static void registerglobalfilters(globalfiltercollection filters)     {         filters.add(new handleerrorattribute());     } } 

because there 1 static method in it, filterconfig should static too. missing something?


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -