If you must, here is some code:

http://www.geocities.com/jeff_louie/OOP/oop40.htm

Regards,
Jeff

*** Sent via Developersdex http://www.developersdex.com ***

Re: Subclassing a Singleton C# by Cowboy

Cowboy
Tue Apr 22 08:15:51 CDT 2008

I like the "if you must" ;-)

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

*************************************************
| Think outside the box!
|
*************************************************
"Jeff Louie" <anonymous@devdex.com> wrote in message
news:OvlOKymoIHA.3652@TK2MSFTNGP03.phx.gbl...
> If you must, here is some code:
>
> http://www.geocities.com/jeff_louie/OOP/oop40.htm
>
> Regards,
> Jeff
>
> *** Sent via Developersdex http://www.developersdex.com ***



Re: Subclassing a Singleton C# by Brian

Brian
Thu Apr 24 16:01:52 CDT 2008

On Apr 19, 5:27=A0pm, Jeff Louie <anonym...@devdex.com> wrote:
> If you must, here is some code:
>
> http://www.geocities.com/jeff_louie/OOP/oop40.htm
>
> Regards,
> Jeff
>
> *** Sent via Developersdexhttp://www.developersdex.com***

One disadvantage to this approach is that the implicit protocol for
subclasses can be circumvented. I could subclass OnlyMaleAnimal and
provide a public constructor making it possible to have many different
instances of OnlyMaleAnimal. If the class hierarchy represented some
kind of security data structure that could be a potential security
flaw. To be fair though, the GoF pattern doesn't address this either.