Snippet: Exception class

property value
IDE VS Code
Language C#
Title Exception class
Shortcut c_Exception
Description class derived from Exception class

Placeholders

Identifier Tooltip Default Value
base Base exception type Exception
modifier Modifier(s) public
name Exception name My

Code

[Serializable]
public class MyException : Exception {
	public MyException() {
	}

	public MyException(string message) : base(message) {
	}

	public MyException(string message, Exception inner) : base(message, inner) {
	}

	protected MyException(SerializationInfo info, StreamingContext context) : base(info, context) {
	}
}