I was wondering what kind of exception should one throw for missing data. For example if an xml node doesn\'t contain data. It would be easy to \"throw new Exception(...
For a general missing data scenario, where the data is referenced by a unique ID, then the KeyNotFoundException might be appropriate - e.g.
KeyNotFoundException
throw new KeyNotFoundException($"Expected record for key {key} not found.");
It is in the System.Collections.Generic namespace.
System.Collections.Generic