Jump to content
  • Advertisement
Sign in to follow this  
Cybrosys

c# - templates, singleton

This topic is 5012 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!