diff options
Diffstat (limited to 'src/mscorlib/src/System/ArrayTypeMismatchException.cs')
-rw-r--r-- | src/mscorlib/src/System/ArrayTypeMismatchException.cs | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/src/mscorlib/src/System/ArrayTypeMismatchException.cs b/src/mscorlib/src/System/ArrayTypeMismatchException.cs index 4f24b9d3c7..3e941fdf8e 100644 --- a/src/mscorlib/src/System/ArrayTypeMismatchException.cs +++ b/src/mscorlib/src/System/ArrayTypeMismatchException.cs @@ -11,42 +11,41 @@ ** =============================================================================*/ -namespace System { - - using System; - using System.Runtime.Serialization; +using System.Runtime.Serialization; + +namespace System +{ // The ArrayMismatchException is thrown when an attempt to store // an object of the wrong type within an array occurs. // - [System.Runtime.InteropServices.ComVisible(true)] [Serializable] - public class ArrayTypeMismatchException : SystemException { - + public class ArrayTypeMismatchException : SystemException + { // Creates a new ArrayMismatchException with its message string set to // the empty string, its HRESULT set to COR_E_ARRAYTYPEMISMATCH, // and its ExceptionInfo reference set to null. - public ArrayTypeMismatchException() - : base(Environment.GetResourceString("Arg_ArrayTypeMismatchException")) { - SetErrorCode(__HResults.COR_E_ARRAYTYPEMISMATCH); + public ArrayTypeMismatchException() + : base(SR.Arg_ArrayTypeMismatchException) + { + HResult = __HResults.COR_E_ARRAYTYPEMISMATCH; } - + // Creates a new ArrayMismatchException with its message string set to // message, its HRESULT set to COR_E_ARRAYTYPEMISMATCH, // and its ExceptionInfo reference set to null. // - public ArrayTypeMismatchException(String message) - : base(message) { - SetErrorCode(__HResults.COR_E_ARRAYTYPEMISMATCH); - } - - public ArrayTypeMismatchException(String message, Exception innerException) - : base(message, innerException) { - SetErrorCode(__HResults.COR_E_ARRAYTYPEMISMATCH); + public ArrayTypeMismatchException(String message) + : base(message) + { + HResult = __HResults.COR_E_ARRAYTYPEMISMATCH; } - protected ArrayTypeMismatchException(SerializationInfo info, StreamingContext context) : base(info, context) { + public ArrayTypeMismatchException(String message, Exception innerException) + : base(message, innerException) + { + HResult = __HResults.COR_E_ARRAYTYPEMISMATCH; } + protected ArrayTypeMismatchException(SerializationInfo info, StreamingContext context) : base(info, context) { } } - } |