Click here to Skip to main content
15,886,689 members
Articles / Programming Languages / C#
Alternative
Tip/Trick

Cloning an Exception (kinda sorta)

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
4 Jul 2011CPOL 4.2K   1  
[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)


Written By
United States United States
I do not claim to be wrong! I just rarely ever write.

Comments and Discussions

 
-- There are no messages in this forum --