c# - templates, singleton
A singleton design in c++ would involve templates to ease and remove code creation. All you did was create your templated singleton class and you inherited that.
I'm trying to find out if that's at all possible for C#? The only information i'm finding when searching the net is different kinds of c# singleton design patterns, but none of them goes into templates or inheritance.
I'm realy not interrested in copy pasting code for each and every class that i want to be a singleton; not that it's alot of code, it's just wrong.
Part of the problem is that templates (generics) are introduced in C# 2.0 (VS.NET 2005) so there are not alot of things writen about it.
I wrote an article on my blog about this:
http://www.codecube.net/item.asp?cc_itemid=245&searchstring=singleton
:-)
http://www.codecube.net/item.asp?cc_itemid=245&searchstring=singleton
:-)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement