C
C#8mo ago
2spooky2play

✅ `T` always value for `nameof`

int id = nameof(T).GetHashCode();
Console.WriteLine(nameof(T));
int id = nameof(T).GetHashCode();
Console.WriteLine(nameof(T));
how come nameof(T) always returns T instead of the type of the generic argument?
2 Replies
2spooky2play
2spooky2playOP8mo ago
fixed: needed to use typeof instead of nameof
MODiX
MODiX8mo ago
Use the /close command to mark a forum thread as answered
Want results from more Discord servers?
Add your server