C
C#2y 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_kun2y 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_kun2y 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
Accord2y 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
More Posts
❔ import and unload dllhello! I am doing something like a "plugin" system in my program, that is, the user selects a dll fi❔ MarginAnyone know an document about margin how works on background? when we resize what being on codeside?Is it possible to create a text box that receives data from right to left? [Answered]Imagine if you had to solve a problem like 57281 * 38268 Don't use a calculator, when you sta❔ Something wrong with my codeSo the problem I have right now is when Yoda wins a game his message saying "Yoda wins the game" won❔ parse a single json property differentlySo i have an existing json model that i cannot retire because some users already use it. I want to bWhat am I doing wrong in Clean Architecture?I got this .sln with seperation of concerns and i have an API that is supposed to fetch string data ❔ Release mode garbage collection is much longer than debug modeI built a WPF app, and to test the lag, i'm just selecting a ListBoxItem and moving my mouse up and ❔ Getting the cookies and current Url from Webview [MAUI]I'm making a simple app where the user needs to log in the first time they're using it in WebView anWhat is the difference between these two methods? Using params or just doing everything in one class```cs public static void Main(string[] args) { int a = 2, b = 3; int sum = Add(a, b) } public s❔ How do I pull information out of a function with alot of information?**I'm getting an error in the below statement SPECIFICALLY at keySet with the error "the name 'keySe