Hi,
I prefer the second, declaring a class as abstract can give the wrong
impression that you want to force the deriving of it.
Note that in order of this class to be usable you have to define either a
method that returns an instance ( using the private constructor) or if you
want to completely prevent any instance declare all the members as static.
In 2.0 you can declare a class as static thus preventing the creation of any
instance.
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"tony" <jo*****************@telia.comwrote in message
news:uQ**************@TK2MSFTNGP02.phx.gbl...
Hello!
If I want to prevent creation of object for a class.
I can accomplish this by using different technique.
One way of doing this is to define the class to be abstract even if all
the
methods and property is concrete.
A second way is to define the constructor as private.
Is it possible to say which of these is better in some way or is it just a
matter of taste.
//Tony