I get a Remove unused internal classes warning on this code:
static void Main( string[] args )
{
IComparable x=GetInfo(typeof(int));
}
static private IComparable GetInfo( Type t )
{
Type c=typeof(Info<>).MakeGenericType(t);
return Activator.CreateInstance(c) as IComparable;
}
private class Info<T> : IComparable
{
public int CompareTo( object obj )
{
throw new Exception("The method or operation is not implemented.");
}
}
The CodeIt.Right version is 1.6.09156
Thanks,
Nadav