Skip to content

Instantly share code, notes, and snippets.

@Ninputer
Last active December 23, 2015 23:19
Show Gist options
  • Save Ninputer/6709189 to your computer and use it in GitHub Desktop.
Save Ninputer/6709189 to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Type listg = typeof(List<>);
Type ilistg = typeof(IList<>);
var Ts = listg.GetGenericArguments();
bool implemented = ilistg.MakeGenericType(Ts).IsAssignableFrom(listg);
Console.WriteLine(implemented);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment