C
C#2y ago
Mango

✅ generic mess

If I have a type that takes <T, E> is there a way to return T generically I.E.
private async Task<Result<T, string>> Get<T>(T type)
private async Task<Result<T, string>> Get<T>(T type)
Where T is a type I pass in
8 Replies
Mango
MangoOP2y ago
So the T generic in my result is also the generic I pass into my method
sibber
sibber2y ago
i dont understand does return type; not work?
Mango
MangoOP2y ago
I'd really prefer returning my result type, it has error stuff involved if something goes awry
sibber
sibber2y ago
why would that be different
Mango
MangoOP2y ago
I'm confused I'm gonna reload VScode and if this red squiggles goes away I'm gonna be happy Okay so I thought the code I sent was wrong but it was just bug with my editor After reloading the error is gone
sibber
sibber2y ago
vscode moment
Mango
MangoOP2y ago
$close
MODiX
MODiX2y ago
Use the /close command to mark a forum thread as answered
Want results from more Discord servers?
Add your server