If you need to cast a generic type parameter to a specific type we can cast it to a object and do the casting like below,
void SomeMethod(T t) { SomeClas
I know this is a late question but here what you can do
A great option is to make your function accept parameter of class object, and do your switch case as you wish
object
And just do the casting
YourClass = (YourClass) parameterObject;