diff options
Diffstat (limited to 'src/mscorlib/src/System/DataMisalignedException.cs')
-rw-r--r-- | src/mscorlib/src/System/DataMisalignedException.cs | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/mscorlib/src/System/DataMisalignedException.cs b/src/mscorlib/src/System/DataMisalignedException.cs new file mode 100644 index 0000000000..d5f946881c --- /dev/null +++ b/src/mscorlib/src/System/DataMisalignedException.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +/*============================================================================= +** +** +** Purpose: The exception class for a misaligned access exception +** +=============================================================================*/ + +namespace System +{ + using System; + using System.Runtime.Serialization; + + [Serializable] +[System.Runtime.InteropServices.ComVisible(true)] + public sealed class DataMisalignedException : SystemException + { + public DataMisalignedException() + : base(Environment.GetResourceString("Arg_DataMisalignedException")) + { + SetErrorCode(__HResults.COR_E_DATAMISALIGNED); + } + + public DataMisalignedException(String message) + : base(message) + { + SetErrorCode(__HResults.COR_E_DATAMISALIGNED); + } + + public DataMisalignedException(String message, Exception innerException) + : base(message, innerException) + { + SetErrorCode(__HResults.COR_E_DATAMISALIGNED); + } + + internal DataMisalignedException(SerializationInfo info, StreamingContext context) + : base (info, context) + { + } + } + +} |