C
C#11mo ago
r2

✅ :white_check_mark: Compiler/ReSharper/something is telling lies (this is about overloads)

Sorry for this. Only engage if you're bored. I've got
c#
// ...
public static IEnumerable<T> GetUserInput<T>(...) {...};
public static T GetUserInput<T>(...) {...};
// ...
c#
// ...
public static IEnumerable<T> GetUserInput<T>(...) {...};
public static T GetUserInput<T>(...) {...};
// ...
and something is screaming
Member with the same signature is already declared
at me. Well, a member with the same signature is not declared! So, what gives?
6 Replies
r2
r2OP11mo ago
The params are identical tho
Jimmacle
Jimmacle11mo ago
return type doesn't count as part of the signature for purposes of overload resolution
r2
r2OP11mo ago
Grteat just great Thank you. That clears it up
Jimmacle
Jimmacle11mo ago
$close
MODiX
MODiX11mo ago
Use the /close command to mark a forum thread as answered
r2
r2OP11mo ago
Two's better than one anyways
Want results from more Discord servers?
Add your server