CSharp · Console
using System;
using System.Collections;
using System.Collections.Generic;
public class Program
{
public static void Main()
{
var a = new List<int>();
Console.WriteLine(a is IEnumerable);
Console.WriteLine(a.GetType().IsSubclassOf(typeof(IEnumerable)));
Console.WriteLine(a.GetType().IsSubclassOf(typeof(IEnumerable<>)));
Console.WriteLine(a.GetType().IsSubclassOf(typeof(IEnumerable<int>)));
}
}