I'm to trying to create a class to deal with loading in resources (textures, sounds etc). I am trying to create it so that I can do something similar to the following:
ContentHandler contentHandler=new ContentHandler(content);
Texture2D texture=contentHandler<Texture2D>["picture"];
The problem I am having is that while I can create the indexers just fine, I don't know how to use templates with it so that I can get a specific type passed to it. I could just use a regular template function, but I'd MUCH rather use the above if it's possible. I've tried searching but I have a hard time coming up with anything.