HResult = HResults.COR_E_NOTFINITENUMBER;
}
- public NotFiniteNumberException(String message)
+ public NotFiniteNumberException(string message)
: base(message)
{
_offendingNumber = 0;
HResult = HResults.COR_E_NOTFINITENUMBER;
}
- public NotFiniteNumberException(String message, double offendingNumber)
+ public NotFiniteNumberException(string message, double offendingNumber)
: base(message)
{
_offendingNumber = offendingNumber;
HResult = HResults.COR_E_NOTFINITENUMBER;
}
- public NotFiniteNumberException(String message, Exception innerException)
+ public NotFiniteNumberException(string message, Exception innerException)
: base(message, innerException)
{
HResult = HResults.COR_E_NOTFINITENUMBER;
}
- public NotFiniteNumberException(String message, double offendingNumber, Exception innerException)
+ public NotFiniteNumberException(string message, double offendingNumber, Exception innerException)
: base(message, innerException)
{
_offendingNumber = offendingNumber;
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
- info.AddValue("OffendingNumber", _offendingNumber, typeof(Int32));
+ info.AddValue("OffendingNumber", _offendingNumber, typeof(int));
}
public double OffendingNumber
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-using System;
-using System.Diagnostics.Contracts;
using System.Runtime.Serialization;
namespace System.Runtime.CompilerServices
[System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public sealed class RuntimeWrappedException : Exception
{
- private Object _wrappedException; // EE expects this name
+ private object _wrappedException; // EE expects this name
// Not an api but has to be public as System.Linq.Expression invokes this through Reflection when an expression
// throws an object that doesn't derive from Exception.
- public RuntimeWrappedException(Object thrownObject)
+ public RuntimeWrappedException(object thrownObject)
: base(SR.RuntimeWrappedException)
{
HResult = HResults.COR_E_RUNTIMEWRAPPED;
_wrappedException = thrownObject;
}
- public override void GetObjectData(SerializationInfo info, StreamingContext context)
+ private RuntimeWrappedException(SerializationInfo info, StreamingContext context)
+ : base(info, context)
{
- base.GetObjectData(info, context);
- info.AddValue("WrappedException", _wrappedException, typeof(object));
+ _wrappedException = info.GetValue("WrappedException", typeof(object));
}
- internal RuntimeWrappedException(SerializationInfo info, StreamingContext context)
- : base(info, context)
+ public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
- _wrappedException = info.GetValue("WrappedException", typeof(object));
+ base.GetObjectData(info, context);
+ info.AddValue("WrappedException", _wrappedException, typeof(object));
}
- public Object WrappedException => _wrappedException;
+ public object WrappedException => _wrappedException;
}
}
using System;
using System.Globalization;
+using System.Runtime.Serialization;
namespace System.Text
{
}
// Exception for decoding unknown byte sequences.
+ [Serializable]
+ [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public sealed class DecoderFallbackException : ArgumentException
{
private byte[] _bytesUnknown = null;
_index = index;
}
+ private DecoderFallbackException(SerializationInfo serializationInfo, StreamingContext streamingContext)
+ {
+ }
+
public byte[] BytesUnknown
{
get
HResult = HResults.COR_E_THREADSTART;
}
- internal ThreadStartException(SerializationInfo info, StreamingContext context)
+ private ThreadStartException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}