I
Ignacio Machin \( .NET/ C# MVP \)
Hi,
IMO this is a bad approach, both for using a singleton, where a static
class should be used and for putting a bunch of unrelated variables in a
common place instead of grouping then based on use.
A singleton should be used when you want a single instance of a class being
created but the code that will use it. DOES NOT KNOW THAT , or is expecting
an instance of a class.
In your case of a "place to put everything that has no better place" you
would be better with a static class.
cheers,
IMO this is a bad approach, both for using a singleton, where a static
class should be used and for putting a bunch of unrelated variables in a
common place instead of grouping then based on use.
A singleton should be used when you want a single instance of a class being
created but the code that will use it. DOES NOT KNOW THAT , or is expecting
an instance of a class.
In your case of a "place to put everything that has no better place" you
would be better with a static class.
cheers,