Frank wrote:

>Static methods provide no more encapsulation than instance methods. Static
>methods are less flexible because they cannot be virtual. I don't see any
>advantage.

But I think Ben's question issued choosing between establishing public
visisbility to the static field and providing a static accessor method
(i.e. a static property) to encapsulate the instance stored in the field:

>>I have a question though is it better making the instance available to
>>the public or providing static methods that fully encapsulate the
>>Singleton.

Imho the accessor method gives you far more flexibility and I'd say it's
the right choise here.

--Stefan

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to