Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / Languages / C#

Cloning an Exception (kinda sorta)

0.00/5 (No votes)
4 Jul 2011CPOL 4.4K  
[Serializable]...
C#
[Serializable]
        public class MyException : Exception
        {
            public MyException() { }
            public MyException(string message) : base(message) { }
            public MyException(string message, Exception inner) : base(message, inner) { }
            protected MyException(
              System.Runtime.Serialization.SerializationInfo info,
              System.Runtime.Serialization.StreamingContext context)
                : base(info, context) { }
        }

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)