Click here to Skip to main content
15,891,567 members
Home / Discussions / C#
   

C#

 
AnswerRe: Setting default validation summary Pin
AhsanS12-Nov-08 20:34
AhsanS12-Nov-08 20:34 
QuestionPass DataSet from Project1 to Project2 Pin
Illegal Operation12-Nov-08 16:36
Illegal Operation12-Nov-08 16:36 
AnswerRe: Pass DataSet from Project1 to Project2 Pin
N a v a n e e t h12-Nov-08 16:42
N a v a n e e t h12-Nov-08 16:42 
AnswerRe: Pass DataSet from Project1 to Project2 Pin
Vimalsoft(Pty) Ltd12-Nov-08 23:01
professionalVimalsoft(Pty) Ltd12-Nov-08 23:01 
GeneralRe: Pass DataSet from Project1 to Project2 Pin
Illegal Operation13-Nov-08 12:21
Illegal Operation13-Nov-08 12:21 
GeneralRe: Pass DataSet from Project1 to Project2 Pin
Vimalsoft(Pty) Ltd13-Nov-08 19:33
professionalVimalsoft(Pty) Ltd13-Nov-08 19:33 
QuestionLimitation of scroll of row header and column header Pin
kakel200812-Nov-08 15:08
kakel200812-Nov-08 15:08 
Questionhow to make exception serializable Pin
George_George12-Nov-08 14:22
George_George12-Nov-08 14:22 
Hello everyone,


According to MSDN, we should "make exceptions serializable". I think it means we should implement the constructor which accepts SerializationInfo and StreamingContext as input parameter, correct?

If yes, could anyone show me how to implement it please?

http://msdn.microsoft.com/en-us/library/ms229064(VS.80).aspx

public class MyException : Exception
{

    private int _errorCode;
    private string _errorDescription;

    public MyException (int errorCode, string errorMessage)
        : base (errorMessage)
    {
        _errorCode = errorCode;
        _errorDescription = errorMessage;
    }

    // This constructor is needed for serialization.
   protected MyException (SerializationInfo info, StreamingContext context)
   {
        // How to implement here?
   }
}



thanks in advance,
George
AnswerRe: how to make exception serializable Pin
N a v a n e e t h12-Nov-08 17:03
N a v a n e e t h12-Nov-08 17:03 
GeneralRe: how to make exception serializable Pin
George_George12-Nov-08 17:52
George_George12-Nov-08 17:52 
GeneralRe: how to make exception serializable Pin
N a v a n e e t h12-Nov-08 19:38
N a v a n e e t h12-Nov-08 19:38 
GeneralRe: how to make exception serializable Pin
George_George12-Nov-08 21:25
George_George12-Nov-08 21:25 
GeneralRe: how to make exception serializable Pin
N a v a n e e t h13-Nov-08 15:09
N a v a n e e t h13-Nov-08 15:09 
GeneralRe: how to make exception serializable Pin
George_George16-Nov-08 2:15
George_George16-Nov-08 2:15 
QuestionC# HttpWebRequest + Cookie ¿Sessions? Pin
fasfasdf12-Nov-08 14:14
fasfasdf12-Nov-08 14:14 
Questionobject? Pin
dec8212-Nov-08 14:02
dec8212-Nov-08 14:02 
AnswerRe: object? Pin
Guffa12-Nov-08 14:37
Guffa12-Nov-08 14:37 
GeneralRe: object? Pin
dec8212-Nov-08 15:03
dec8212-Nov-08 15:03 
GeneralRe: object? Pin
Mbah Dhaim12-Nov-08 15:43
Mbah Dhaim12-Nov-08 15:43 
GeneralRe: object? Pin
Dave Kreskowiak12-Nov-08 15:47
mveDave Kreskowiak12-Nov-08 15:47 
GeneralRe: object? Pin
Paul Conrad12-Nov-08 17:10
professionalPaul Conrad12-Nov-08 17:10 
QuestionCrystal report crashes when report object's printer name is changed Pin
muharrem12-Nov-08 10:51
muharrem12-Nov-08 10:51 
AnswerRe: Crystal report crashes when report object's printer name is changed Pin
Paul Conrad12-Nov-08 11:16
professionalPaul Conrad12-Nov-08 11:16 
QuestionIPC Events in windows service Pin
picazo12-Nov-08 10:37
picazo12-Nov-08 10:37 
QuestionRe: IPC Events in windows service Pin
Mark Salsbery12-Nov-08 11:03
Mark Salsbery12-Nov-08 11:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.