Search
Get Started
C
C#
•
3y 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
C#
Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,010
Members
View on Discord
Similar Threads
Was this page helpful?
Yes
No
private
async
Task
<
Result
<
T
,
string
>>
Get
<
T
>(
T
type
)
private
async
Task
<
Result
<
T
,
string
>>
Get
<
T
>(
T
type
)
Similar Threads
❔ Array mess
C
C# / help
3y ago
✅ Why is this generic mess invalid? ('Does not implement interface' error)
C
C# / help
6mo ago
❔ generic class in generic method
C
C# / help
3y ago
Generic Interfaces
C
C# / help
3y ago