1 // Licensed to the .NET Foundation under one or more agreements. 2 // The .NET Foundation licenses this file to you under the MIT license. 3 // See the LICENSE file in the project root for more information. 4 5 using System.Runtime.Serialization; 6 7 namespace System.Runtime.Serialization 8 { 9 [Serializable] 10 [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] 11 public class SerializationException : SystemException 12 { 13 private static String s_nullMessage = SR.SerializationException; 14 15 // Creates a new SerializationException with its message 16 // string set to a default message. SerializationException()17 public SerializationException() 18 : base(s_nullMessage) 19 { 20 HResult = HResults.COR_E_SERIALIZATION; 21 } 22 SerializationException(String message)23 public SerializationException(String message) 24 : base(message) 25 { 26 HResult = HResults.COR_E_SERIALIZATION; 27 } 28 SerializationException(String message, Exception innerException)29 public SerializationException(String message, Exception innerException) 30 : base(message, innerException) 31 { 32 HResult = HResults.COR_E_SERIALIZATION; 33 } 34 SerializationException(SerializationInfo info, StreamingContext context)35 protected SerializationException(SerializationInfo info, StreamingContext context) 36 : base(info, context) 37 { 38 } 39 } 40 } 41