Sprawdź, czy typ implementuje ogólny interfejs bez uwzględnienia ogólnych argumentów typu

Mam interfejs

public interface MyInterface<TKey, TValue>
{
}

Implementacje są nieistotne. Teraz chcę sprawdzić, czy dany typ jest implementacją tego interfejsu. Ta metoda zawodzi

public class MyClass : MyInterface<int, string>
{
}

Ale nie wiem, jak to zrobić.

public void CheckIfTypeImplementsInterface(Type type)
{
    var result1 = typeof(MyInterface<,>).IsAssignableFrom(type); --> false
    var result2 = typeof(MyInterface<int,string>).IsAssignableFrom(type); --> true
}

Co muszę zrobić, aby wynik1 był prawdziwy?

questionAnswers(2)

yourAnswerToTheQuestion