Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
C#
c# check if object is of any generic type
Carmen Alvarez
Programming language:
C#
2021-05-25 15:52:55
0
Q:
c# check if object is of any generic type
BetterEnglish
Code:
C#
2021-04-08 04:10:16
return list.GetType().GetGenericTypeDefinition() == typeof(List<>);
0
Tags
object
check
type
gene
Related
c# collection of generic classes
how to find the type of a object c#
check property type of collection c#
c# reflection create generic type
c# check if type implements interface
convert generic to type c#
c# get list object type of generic list
c# get type of object
c# generic return type in interface
how to check which item is in an object property c#
list contains type c#
c sharp check if key in dictionary
generics in c#
c sharp check if list contains
c# nullable generic
New to Communities?
Join the community