Use reflection to get type of abstract base class [Answered]
I have the following setup:
I want to use reflection to find out what kind of formatter a certain type is
How do I go about getting this?
4 Replies
Btw there is no reflection tag
Maybe
Type.GetTypeInheritance()
is a good place to start?get base type, get its generic type args
https://sharplab.io/#v2:C4LgTgrgdgNAJiA1AHwAICYCMBYAUKgBgAJVMA6AJQFMAzAGyoGNgBLAeygG48fcAVAJ4AHKkWDDRAXjES2NABQBlYGBZQA5gDE2YALYBDYMCpgAlN3yZi4kQDl9uqTJFkAQvoDOVQS4DiVKBMWRh8qAEEwdQhHKGAPAG0CAF0ye0cLUgBOeRsqNKpzXn0AIw8VfWYSdCJtPUNjMAAePgA+IgBvIgBfPAwiZVUNWoMjEyIQGp0RhsbSAjbOntwgA
Thanks!
✅ This post has been marked as answered!