SerializationException.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / clr / src / BCL / System / Runtime / Serialization / SerializationException.cs / 1 / SerializationException.cs

                            // ==++== 
//
//   Copyright (c) Microsoft Corporation.  All rights reserved.
//
// ==--== 
/*==============================================================================
** 
** Class: SerializationException 
**
** 
** Purpose: Thrown when something goes wrong during serialization or
**          deserialization.
**
** 
=============================================================================*/
 
namespace System.Runtime.Serialization { 

 	using System; 
	using System.Runtime.Serialization;

[System.Runtime.InteropServices.ComVisible(true)]
    [Serializable] public class SerializationException : SystemException { 
    	
    	private static String _nullMessage = Environment.GetResourceString("Arg_SerializationException"); 
    	 
        // Creates a new SerializationException with its message
        // string set to a default message. 
        public SerializationException()
            : base(_nullMessage) {
    		SetErrorCode(__HResults.COR_E_SERIALIZATION);
        } 
    	
        public SerializationException(String message) 
            : base(message) { 
    		SetErrorCode(__HResults.COR_E_SERIALIZATION);
        } 

        public SerializationException(String message, Exception innerException) : base (message, innerException) {
    		SetErrorCode(__HResults.COR_E_SERIALIZATION);
        } 

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

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK