Do not derive user-defined exceptions from the Exception base class.
End exception class names with the word "Exception".
You should add fields to this base class to capture specific information, such as the date and time the exception occurred, the machine name, and so on. This encapsulates the common exception details into the single base class and makes this information available to your exception classes through inheritance.
所有异常和实体定义在单独的程序集中
Throw an InvalidOperationException if a property set or method call is not appropriate given the object's current state.
Throw an ArgumentException or a class derived from ArgumentException if invalid parameters are passed.
ArgumentNullException whenever a null reference (Nothing in Visual Basic) is passed to a method that does not accept it as a valid argument.
ArgumentOutOfRangeException when the value of an argument is outside the range of acceptable values; for example, when the value "46" is passed as the month argument during the creation of a DateTime.