How to use reflection on a singlton object (i.e. the default constructor is
private)?
I have a configuration file which contains a list of class names. All these
class are simplified singleton type with the similar defintion as below:
public class S
{
private S() {....}
public static S Instance // can be replaced with a method if that makes
things easier
{
get { return _me; }
}
private static S _me = new S();
public void Init() { .....} // do something
};
what I want to do is to invoked the Init() method on all these classes
(whose names are defined in the configuration file).
How can I achieve this? Many thanks in advance for any help and/or thought.