1: /// <summary>
2: /// My Exception class.
3: /// </summary>
4: [Serializable]
5: public class MyException : Exception
6: {
7: //
8: // For guidelines regarding the creation of new exception types, see
9: // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconerrorraisinghandlingguidelines.asp
10: // and
11: // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp07192001.asp
12: //
13:
14: /// <summary>
15: /// Initializes a new instance of the <see cref="MyException"/> class.
16: /// </summary>
17: public MyException()
18: {
19: }
20:
21: /// <summary>
22: /// Initializes a new instance of the <see cref="MyException"/> class.
23: /// </summary>
24: /// <param name="message">The message.</param>
25: public MyException(string message) : base(message)
26: {
27: }
28:
29: /// <summary>
30: /// Initializes a new instance of the <see cref="MyException"/> class.
31: /// </summary>
32: /// <param name="message">The message.</param>
33: /// <param name="inner">The inner.</param>
34: public MyException(string message, Exception inner) : base(message, inner)
35: {
36: }
37:
38: /// <summary>
39: /// Initializes a new instance of the <see cref="MyException"/> class.
40: /// </summary>
41: /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> that holds the serialized object data about the exception being thrown.</param>
42: /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext"/> that contains contextual information about the source or destination.</param>
43: /// <exception cref="T:System.ArgumentNullException">
44: /// The <paramref name="info"/> parameter is null.
45: /// </exception>
46: /// <exception cref="T:System.Runtime.Serialization.SerializationException">
47: /// The class name is null or <see cref="P:System.Exception.HResult"/> is zero (0).
48: /// </exception>
49: protected MyException(
50: SerializationInfo info,
51: StreamingContext context) : base(info, context)
52: {
53: }
54: }