I have a class that is created as a singleton because its used to access the filesystem in a multi-threaded app.
As part of the class instantiation I need to assign some values to an internal list used by the class when I set an instance of it.
Heres some bare bones code for what im trying to do
The singleton class
sealed public class Validator : IValidator
set up some private variable here...
List<blah> lst = new List<blah>(); basically 1 or more pairs of strings
public static Validator Instance
code here to add items to the List (lst)?
SchemaSet = new XmlSchemaSet();
for each (blah b in lst)
more code here.......
and the code to use an instance of my class
private Validator SValidator;
SValidator = Validator.Instance; -- add items to the List here?
so when I create an instance of Validator, how can I assign values to the list when its being created, something like
View Complete Post