A Factory Class is an example of one with all static members. > -----Original Message----- > From: dotnet discussion [mailto:[EMAIL PROTECTED]]On Behalf Of > David Ferguson > Sent: 24 May 2002 15:48 > To: [EMAIL PROTECTED] > Subject: [DOTNET] Should constructors of all static classes be private? > > > It seems like a class with only static functions should have a private > constructor, since you shouldn't need to create an instance of the > class. > > For example: > > class AllStatic > { > private AllStatic() {} // No sense instantiating one of these > > public static Method1() {...} > } > > Or maybe you should allow the user to create an instance. It really > shouldn't hurt anything. > > What do you think? > > Is there a special name for a class with all static members? > > Thanks...David > > You can read messages from the DOTNET archive, unsubscribe from DOTNET, or > subscribe to other DevelopMentor lists at http://discuss.develop.com.
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.