I heard you should never throw a string because there is a lack of information and you\'ll catch exceptions you dont expect to catch. What are good practice for throwing exc
As it has been already said use them for exceptional situations only.
Always provide a way for the user to avoid throwing an exception, eg. if you have method, that will throw if something goes wrong like this:
public void DoSomethingWithFile() {
if(!File.Exists(..))
throw new FileNotFoundException();
}
Provide another method for the user to call:
public bool CanDoSomething() {
return File.Exists(..);
}
This way there the caller can avoid exceptions if he wants. Do not hesitate to throw if something is wrong - "fail fast", but always provide exception-free path.
Also keep your exception class hierarchy flat and take a look at the standard exceptions like InvalidStateException and ArgumentNullExcpetion.