|
Right, but I don't think the question implied that.
I think that throwing a more descriptive Exception is what's needed there -- tell the caller which parameter was null.
|
|
|
|
|
The parameter that was supposed to tell the caller which parameter was null!
It's an OO world.
public class Naerling : Lazy<Person>{
public void DoWork(){ throw new NotImplementedException(); }
}
|
|
|
|
|
Assuming the function's contract calls for a non-null parameter, I would throw an ArgumentNullException instead of the more general ReferenceNullException .
/ravi
|
|
|
|