Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17560

Properly use of Generics Class

$
0
0

hello!

i'm actually working with an already working module that i have to convert to Generic, what i mean is that i have this module that is working on DI and i need to allow it to get a generic DI during the factory creation.

i learned generics but i never really used it.. so will be enought to pass the superclass as generic parameters on <T> and reference it as T in all of the code inside the module?

what for the reference to that module? should be ok to just reference to it like 

private MyModule<TSuperClass> myModule …


Viewing all articles
Browse latest Browse all 17560

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>