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
Using as:
SomeClass obj2 = t as SomeClass;
This would not throw an exception and t would be null if the cast fails.
I don't really know what you're trying to do, but I hope that you're not missing the point of Generics here.
If your intention is to restrict the method to type SomeClass and descendants:
void SomeMethod(T t) where T : SomeClass