Re:Nullable vs. Nullable in C#
by Uvix on Friday August 29, 2025 @08:10AM
(#45063009)
Both look like they’ll work. For the struct case I think yours is better. For the class case I think using Cast() like the original instead of OfType() makes more sense - you don’t need to filter out other types from the enumerable, so cast once instead of casting then performing a useless check on the result.
[ Parent
| on HN ]
There are no comments on this comment yet.