Advertisement
Guest User

Untitled

a guest
Apr 26th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.26 KB | None | 0 0
  1. public class GenericClass<T>
  2. {
  3.     ...
  4. }
  5.  
  6. public class SubClass : BaseClass
  7. {
  8.     ...
  9. }
  10.  
  11. public void Test(object someClass)
  12. {
  13.     if(someClass is SubClass)
  14.         // Do Stuff
  15.    
  16.     // How do you properly check if someClass is the GenericClass<T> and which type T is of?
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement