Should params arrays be declared nullable?
Closed this issue · 1 comments
Keboo commented
There a few cases to consider here (assume nullability enabled):
Array that contain nullable types (object?), value types (int), and non-null reference types (object)
Should there be guidance on if the params array be declared nullable?
Proposal:
CONSIDER: Declare params arrays as non-nullable.
This aligns with built-in methods such as string.Format.
Keboo commented
After discussion, this is unlikely to provide much value. Though good to declare non-nullable the impact is low and the value add is also low.