I have a user control A which inherits from a concrete base type B which in turn inherits from a generic control C.
I need to check if A inherits from C and currently I'm doing the following:
var cType = typeof(C<>);
var aType = typeof(A);
if (aType.BaseType.BaseType?.FullName == cTye.FullName) {}
The above works but I was wondering if there's a cleaner way to do this?
Very nice information. I would like to appreciate you. Keep it up!
RépondreSupprimerBest Data Science Online Training Institute In Hyderabad | Online Data Science Training