C
C#3y ago
kunio_kun

❔ Check What Generic Type a Class Implements

Hi, I'm trying to find if a class implements ISomething<T> and what T is For example, to find Foo in this class implementing ISomething<T>
public class Something: ISomething<Foo>
public class Something: ISomething<Foo>
Is it possible? Thanks in advance
5 Replies
kunio_kun
kunio_kunOP3y ago
mmm thanks i have read both of those ah maybe i should try some stuff first this case Something is not generic
kunio_kun
kunio_kunOP3y ago
it seems like i'll have to GetInterfaces yes I'm scanning types in the assembly thanks a lot 😄 oh, another question, why does t.IsAssignableTo(typeof(ISomething<>)) returns false for something that implements ISomething<T>? i see thanks again 😄 noted
WhiteBlackGoose
@Diddy can you make a second account from which you won't be shy to keep messages?
Accord
Accord3y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server