c# check if generic is value type code example
Example: c# check if object is of any generic type
return list.GetType().GetGenericTypeDefinition() == typeof(List<>);
return list.GetType().GetGenericTypeDefinition() == typeof(List<>);