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

C# Parameter Null Validation, Explained

by Haiyang Wang4mJune 25th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

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
Haiyang Wang

Haiyang Wang

@callmewhy

Newbie Programmer

About @callmewhy
LEARN MORE ABOUT @CALLMEWHY'S
EXPERTISE AND PLACE ON THE INTERNET.

Share Your Thoughts

About Author

Haiyang Wang HackerNoon profile picture
Haiyang Wang@callmewhy
Newbie Programmer

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
L O A D I N G
. . . comments & more!