C# Parameter Null Validation, Explainedby@callmewhy
2,256 reads

C# Parameter Null Validation, Explained

June 25th 2020
4 min
by @callmewhy 2,256 reads
tldt arrow
Read on Terminal Reader🖨️

Too Long; Didn't Read

C# Parameter Null Validation, Explained by Haiyang Wang Newbie Programmer. It is a common practice to check for null in parameters, but why? What would happen if we don't check the parameters? What's the benefit of parameters null validation? In most cases, it's necessary and useful in most cases. Validate null parameters can avoid execution which shouldn't happen, and it can specify the responsibility of the unexpected exception. It's a good choice to enable the CA1062 Warning, we needn't care about when to validate the parameters.

Company Mentioned

Mention Thumbnail
featured image - C# Parameter Null Validation, Explained
Haiyang Wang HackerNoon profile picture

@callmewhy

Haiyang Wang

About @callmewhy
LEARN MORE ABOUT @CALLMEWHY'S EXPERTISE AND PLACE ON THE INTERNET.
react to story with heart

RELATED STORIES

L O A D I N G
. . . comments & more!
Hackernoon hq - po box 2206, edwards, colorado 81632, usa