A
Andrey Dzizenko
Hi all!
I have a singleton-class with private constructor and Instance property.
It's clear that access to this class should be got by using this property.
"new Class()" construction is incorrect and throws an error "can't access
due to its protection level".
Is there any opportunity to define custom error when accessing this class
constructor? E.g. "This class is singleton. Use should use Instance
property to get its instance"
Thank you in advance.
A. Dzizenko.
I have a singleton-class with private constructor and Instance property.
It's clear that access to this class should be got by using this property.
"new Class()" construction is incorrect and throws an error "can't access
due to its protection level".
Is there any opportunity to define custom error when accessing this class
constructor? E.g. "This class is singleton. Use should use Instance
property to get its instance"
Thank you in advance.
A. Dzizenko.