Basically i know how and why we use ArgumentNullException. One thing that is not clear for me yet is when exactly do we need to use it.
Currently i think we need to use it when we write method with parameter and there is a possibility someone who use our code will pass a null parameter. This example is for when we write a library and someone else around the world use the code, or when we work on team.
What if we write code for our own, there is still possibility for null parameter but from the caller method we make sure that the param is never null (we know that it's should not be null since we are the one who write the method). Do we still need to use ArgumentNullException?