Hello Microsoft Team,
I have question regarding IsAssignableTo Method
Url : https://docs.microsoft.com/en-us/dotnet/api/system.type.isassignableto?view=net-5.0
When I try to check my class has assignable interface(generic) or not.
So I am using IsAssignableTo method to check, it is give me true or false.
It is working fine in asp.net core 3.1 but when I use it with 5.0, it is not working.
It always returns false when I use generic Interface.
Here is my sample code,
var status = typeof(MyClass).IsAssignableTo(IMyInterface<,>)
public class MyClassModel{}
public interface IMyInterface<MyClassModel,int>{}
public class MyClass : IMyInterface<MyClassModel,int>{}
IsAssignableTo is always return false when I check MyClass is implemented Generic Interface.
Could you please provide some solution to resolve this issue?
Thanks.