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