What should you do if somebody passes a null pointer for a parameter that should never be null? What if it’s a Windows Runtime class?

1 · Raymond Chen · June 13, 2019, 2 p.m.
If you have a function for which a parameter may not be null, what should you do if somebody passes null anyway? There are multiple layers to this question, depending on the technology you are using, so let’s start small and work our way up. The post What should you do if somebody passes a null pointer for a parameter that should never be null? What if it’s a Windows Runtime class? appeared first on The Old New Thing....