You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While I love testing arguments for valid state and it is better to check than not to check, this check is redundant and more importantly is teaching junior developers, who may not know any better, that structs might be null - which by definition they can't.
The text was updated successfully, but these errors were encountered:
@martincostello I don't use github for pushing so I had some issues pushing my changes back up from SourceTree and I don't think I followed your contrib rules - sorry. However, I hope the changes to the WPF main page are acceptable. Take a look and let me know what you think of the proposed changes.
Just trying to promote good programming practices.
The first line of each test reads:
if (cancellationToken == null) throw new ArgumentNullException(nameof(cancellationToken));
CancellationToken
is astruct
and thus can never benull
.CS0037 - Cannot convert null to 'type' because it is a non-nullable value type.
See: cs0037
While I love testing arguments for valid state and it is better to check than not to check, this check is redundant and more importantly is teaching junior developers, who may not know any better, that
struct
s might benull
- which by definition they can't.The text was updated successfully, but these errors were encountered: