--- /dev/null
+//
+// System.ApplicationException.cs
+//
+// Author:
+// Joe Shaw (joe@ximian.com)
+//
+// (C) 2001 Ximian, Inc. http://www.ximian.com
+//
+
+namespace System {
+
+ public class ApplicationException : Exception {
+ // Constructors
+ public ApplicationException ()
+ : base ("An application exception has occurred.");
+ {
+ }
+
+ public ApplicationException (string message)
+ : base (message)
+ {
+ }
+
+ public ApplicationException (string message, Exception inner)
+ : base (message, inner)
+ {
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+//
+// System.ArgumentException.cs
+//
+// Author:
+// Joe Shaw (joe@ximian.com)
+//
+// (C) 2001 Ximian, Inc. http://www.ximian.com
+//
+
+namespace System {
+
+ public class ArgumentException : SystemException {
+ private string param_name;
+
+ // Constructors
+ public ArgumentException ()
+ : base ("An invalid argument was specified.")
+ {
+ }
+
+ public ArgumentException (string message)
+ : base (message)
+ {
+ }
+
+ public ArgumentException (string message, Exception inner)
+ : base (message, inner)
+ {
+ }
+
+ public ArgumentException (string message, string param_name)
+ : base (message)
+ {
+ this.param_name = param_name;
+ }
+
+ public ArgumentException (string message, string param_name, Exception inner)
+ : base (message, inner)
+ {
+ this.param_name = param_name;
+ }
+
+ // Properties
+ public virtual string ParamName {
+ get {
+ return param_name;
+ }
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+//
+// System.ArgumentNullException.cs
+//
+// Author:
+// Joe Shaw (joe@ximian.com)
+//
+// (C) 2001 Ximian, Inc. http://www.ximian.com
+//
+
+namespace System {
+
+ public class ArgumentNullException : ArgumentException {
+ // Constructors
+ public ArgumentNullException ()
+ : base ("Argument cannot be null")
+ {
+ }
+
+ public ArgumentNullException (string param_name)
+ : base ("Argument cannot be null", param_name)
+ {
+ }
+
+ public ArgumentNullException (string param_name, string message)
+ : base (message, param_name)
+ {
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+//
+// System.ArgumentOutOfRangeException.cs
+//
+// Author:
+// Joe Shaw (joe@ximian.com)
+//
+// (C) 2001 Ximian, Inc. http://www.ximian.com
+//
+
+namespace System {
+
+ public class ArgumentOutOfRangeException : ArgumentException {
+ private object actual_value;
+
+ // Constructors
+ public ArgumentOutOfRangeException ()
+ : base ("Argument is out of range")
+ {
+ }
+
+ public ArgumentOutOfRangeException (string param_name)
+ : base ("Argument is out of range", param_name)
+ {
+ }
+
+ public ArgumentOutOfRangeException (string param_name, string message)
+ : base (message, param_name)
+ {
+ }
+
+ public ArgumentOutOfRangeException (string param_name, object actual_value, string message)
+ : base (message, param_name)
+ {
+ this.actual_value = actual_value;
+ }
+
+ // Properties
+ public virtual object ActualValue {
+ get {
+ return actual_value;
+ }
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+//
+// System.ArithmeticException.cs
+//
+// Author:
+// Joe Shaw (joe@ximian.com)
+//
+// (C) 2001 Ximian, Inc. http://www.ximian.com
+//
+
+namespace System {
+
+ public class ArithmeticException : SystemException {
+ // Constructors
+ public ArithmeticException ()
+ : base ("The arithmetic operation is not allowed")
+ {
+ }
+
+ public ArithmeticException (string message)
+ : base (message)
+ {
+ }
+
+ public ArithmeticException (string message, Exception inner)
+ : base (message, inner)
+ {
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+//
+// System.ArrayTypeMismatchException.cs
+//
+// Author:
+// Joe Shaw (joe@ximian.com)
+//
+// (C) 2001 Ximian, Inc. http://www.ximian.com
+//
+
+namespace System {
+
+ public class ArrayTypeMismatchException : SystemException {
+ // Constructors
+ public ArrayTypeMismatchException ()
+ : base ("Source array type cannot be assigned to destination array type")
+ {
+ }
+
+ public ArrayTypeMismatchException (string message)
+ : base (message)
+ {
+ }
+
+ public ArrayTypeMismatchException (string message, Exception inner)
+ : base (message, inner)
+ {
+ }
+ }
+}
\ No newline at end of file
+2001-07-06 Joe Shaw <joe@ximian.com>
+
+ * Int16.cs, Int32.cs, Int64.cs, UInt16.cs, UInt32.cs, UInt64.cs:
+ Implement the IComparable and IFormattable interfaces. Fix a
+ typo (publig -> public)
+
+ * ApplicationException.cs, ArgumentException.cs,
+ ArgumentNullException.cs, ArgumentOutOfRangeException.cs,
+ ArtithmeticException.cs, ArrayTypeMismatchException.cs,
+ DivideByZeroException.cs, DuplicateWaitObjectException.cs,
+ ExecutionEngineException.cs, FormatException.cs,
+ IndexOutOfRangeException.cs, InvalidCastException.cs,
+ InvalidOperationException.cs, InvalidProgramException.cs,
+ MulticateNotSupportedException.cs, NotFiniteNumberException.cs,
+ NotSupportedException.cs, NullReferenceException.cs,
+ OutOfMemoryException.cs, OverflowException.cs, RankException.cs,
+ StackOverflowException.cs, SystemException.cs,
+ TypeInitializationException.cs: Added all of the exceptions
+ specified by the language spec. Mmmm... bloat.
+
2001-07-06 Miguel de Icaza <miguel@ximian.com>
* Int64.cs, Int32.cs: Put. Parsing and ToString missing. Should
--- /dev/null
+//
+// System.DivideByZeroException.cs
+//
+// Author:
+// Joe Shaw (joe@ximian.com)
+//
+// (C) 2001 Ximian, Inc. http://www.ximian.com
+//
+
+namespace System {
+
+ public class DivideByZeroException : ArithmeticException {
+ // Constructors
+ public DivideByZeroException ()
+ : base ("Division by zero")
+ {
+ }
+
+ public DivideByZeroException (string message)
+ : base (message)
+ {
+ }
+
+ public DivideByZeroException (string message, Exception inner)
+ : base (message, inner)
+ {
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+//
+// System.DuplicateWaitObjectException.cs
+//
+// Author:
+// Joe Shaw (joe@ximian.com)
+//
+// (C) 2001 Ximian, Inc. http://www.ximian.com
+//
+
+namespace System {
+
+ public class DuplicateWaitObjectException : ArgumentException {
+ // Constructors
+ public DuplicateWaitObjectException ()
+ : base ("Duplicate objects in argument")
+ {
+ }
+
+ public DuplicateWaitObjectException (string param_name)
+ : base ("Duplicate objects in argument", param_name)
+ {
+ }
+
+ public DuplicateWaitObjectException (string param_name, string message)
+ : base (message, param_name)
+ {
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+//
+// System.ExecutionEngineException.cs
+//
+// Author:
+// Joe Shaw (joe@ximian.com)
+//
+// (C) 2001 Ximian, Inc. http://www.ximian.com
+//
+
+namespace System {
+
+ public sealed class ExecutionEngineException : SystemException {
+ // Constructors
+ public ExecutionEngineException ()
+ : base ("Internal error occurred") // Haha. Nice.
+ {
+ }
+
+ public ExecutionEngineException (string message)
+ : base (message)
+ {
+ }
+
+ public ExecutionEngineException (string message, Exception inner)
+ : base (message, inner)
+ {
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+//
+// System.FormatException.cs
+//
+// Author:
+// Joe Shaw (joe@ximian.com)
+//
+// (C) 2001 Ximian, Inc. http://www.ximian.com
+//
+
+namespace System {
+
+ public class FormatException : SystemException {
+ // Constructors
+ public FormatException ()
+ : base ("Invalid format")
+ {
+ }
+
+ public FormatException (string message)
+ : base (message)
+ {
+ }
+
+ public FormatException (string message, Exception inner)
+ : base (message, inner)
+ {
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+//
+// System.IndexOutOfRangeException.cs
+//
+// Author:
+// Joe Shaw (joe@ximian.com)
+//
+// (C) 2001 Ximian, Inc. http://www.ximian.com
+//
+
+namespace System {
+
+ public sealed class IndexOutOfRangeException : SystemException {
+ // Constructors
+ public IndexOutOfRangeException ()
+ : base ("Array index is out of range")
+ {
+ }
+
+ public IndexOutOfRangeException (string message)
+ : base (message)
+ {
+ }
+
+ public IndexOutOfRangeException (string message, Exception inner)
+ : base (message, inner)
+ {
+ }
+ }
+}
\ No newline at end of file
namespace System {
- public struct Int16 : ValueType {
+ public struct Int16 : ValueType, IComparable, IFormattable {
public const short MinValue = -32768;
public const short MaxValue = 32767;
return "";
}
- publig string ToString (string format, IFormatProvider fp)
+ public string ToString (string format, IFormatProvider fp)
{
// TODO: Implement me.
return "";
namespace System {
- public struct Int32 : ValueType {
+ public struct Int32 : ValueType, IComparable, IFormattable {
public const int MinValue = 0x80000000;
public const int MaxValue = 0x7fffffff;
return "";
}
- publig string ToString (string format, IFormatProvider fp)
+ public string ToString (string format, IFormatProvider fp)
{
// TODO: Implement me.
return "";
namespace System {
- public struct Int64 : ValueType {
+ public struct Int64 : ValueType, IComparable, IFormattable {
public const long MinValue = 0x8000000000000000;
public const long MaxValue = 0x7fffffffffffffff;
return "";
}
- publig string ToString (string format, IFormatProvider fp)
+ public string ToString (string format, IFormatProvider fp)
{
// TODO: Implement me.
return "";
--- /dev/null
+//
+// System.InvalidCastException.cs
+//
+// Author:
+// Joe Shaw (joe@ximian.com)
+//
+// (C) 2001 Ximian, Inc. http://www.ximian.com
+//
+
+namespace System {
+
+ public class InvalidCastException : SystemException {
+ // Constructors
+ public InvalidCastException ()
+ : base ("Cannot cast from source type to destination type")
+ {
+ }
+
+ public InvalidCastException (string message)
+ : base (message)
+ {
+ }
+
+ public InvalidCastException (string message, Exception inner)
+ : base (message, inner)
+ {
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+//
+// System.InvalidOperationException.cs
+//
+// Author:
+// Joe Shaw (joe@ximian.com)
+//
+// (C) 2001 Ximian, Inc. http://www.ximian.com
+//
+
+namespace System {
+
+ public class InvalidOperationException : SystemException {
+ // Constructors
+ public InvalidOperationException ()
+ : base ("The requested operation cannot be performed")
+ {
+ }
+
+ public InvalidOperationException (string message)
+ : base (message)
+ {
+ }
+
+ public InvalidOperationException (string message, Exception inner)
+ : base (message, inner)
+ {
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+//
+// System.InvalidProgramException.cs
+//
+// Author:
+// Joe Shaw (joe@ximian.com)
+//
+// (C) 2001 Ximian, Inc. http://www.ximian.com
+//
+
+namespace System {
+
+ public sealed class InvalidProgramException : SystemException {
+ // Constructors
+ public InvalidProgramException ()
+ : base ("Metadata is incorrect")
+ {
+ }
+
+ public InvalidProgramException (string message)
+ : base (message)
+ {
+ }
+
+ public InvalidProgramException (string message, Exception inner)
+ : base (message, inner)
+ {
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+//
+// System.MulticastNotSupportedException.cs
+//
+// Author:
+// Joe Shaw (joe@ximian.com)
+//
+// (C) 2001 Ximian, Inc. http://www.ximian.com
+//
+
+namespace System {
+
+ public sealed class MulticastNotSupportedException : SystemException {
+ // Constructors
+ public MulticastNotSupportedException ()
+ : base ("This operation cannot be performed with the specified delagates")
+ {
+ }
+
+ public MulticastNotSupportedException (string message)
+ : base (message)
+ {
+ }
+
+ public MulticastNotSupportedException (string message, Exception inner)
+ : base (message, inner)
+ {
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+//
+// System.NotFiniteNumberException.cs
+//
+// Author:
+// Joe Shaw (joe@ximian.com)
+//
+// (C) 2001 Ximian, Inc. http://www.ximian.com
+//
+
+namespace System {
+
+ public class NotFiniteNumberException : ArithmeticException {
+ double offending_number;
+
+ // Constructors
+ public NotFiniteNumberException ()
+ : base ("The number encountered was not a finite quantity")
+ {
+ }
+
+ public NotFiniteNumberException (double offending_number)
+ {
+ this.offending_number = offending_number;
+ }
+
+ public NotFiniteNumberException (string message)
+ : base (message)
+ {
+ }
+
+ public NotFiniteNumberException (string message, double offending_number)
+ {
+ this.offending_number = offending_number;
+ }
+
+ public NotFiniteNumberException (string message, double offending_number, Exception inner)
+ : base (message, inner)
+ {
+ this.offending_number = offending_number;
+ }
+
+ // Properties
+ public virtual double OffendingNumber {
+ get {
+ return offending_number;
+ }
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+//
+// System.NotSupportedException.cs
+//
+// Author:
+// Joe Shaw (joe@ximian.com)
+//
+// (C) 2001 Ximian, Inc. http://www.ximian.com
+//
+
+namespace System {
+
+ public class NotSupportedException : SystemException {
+ // Constructors
+ public NotSupportedException ()
+ : base ("Operation is not supported")
+ {
+ }
+
+ public NotSupportedException (string message)
+ : base (message)
+ {
+ }
+
+ public NotSupportedException (string message, Exception inner)
+ : base (message, inner)
+ {
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+//
+// System.NullReferenceException.cs
+//
+// Author:
+// Joe Shaw (joe@ximian.com)
+//
+// (C) 2001 Ximian, Inc. http://www.ximian.com
+//
+
+namespace System {
+
+ public class NullReferenceException : SystemException {
+ // Constructors
+ public NullReferenceException ()
+ : base ("A null value was found where an object instance was required")
+ {
+ }
+
+ public NullReferenceException (string message)
+ : base (message)
+ {
+ }
+
+ public NullReferenceException (string message, Exception inner)
+ : base (message, inner)
+ {
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+//
+// System.OutOfMemoryException.cs
+//
+// Author:
+// Joe Shaw (joe@ximian.com)
+//
+// (C) 2001 Ximian, Inc. http://www.ximian.com
+//
+
+namespace System {
+
+ public class OutOfMemoryException : SystemException {
+ // Constructors
+ public OutOfMemoryException ()
+ : base ("There is insufficient memory to continue execution")
+ {
+ }
+
+ public OutOfMemoryException (string message)
+ : base (message)
+ {
+ }
+
+ public OutOfMemoryException (string message, Exception inner)
+ : base (message, inner)
+ {
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+//
+// System.OverflowExceptionException.cs
+//
+// Author:
+// Joe Shaw (joe@ximian.com)
+//
+// (C) 2001 Ximian, Inc. http://www.ximian.com
+//
+
+namespace System {
+
+ public class OverflowExceptionException : ArithmeticException {
+ // Constructors
+ public OverflowExceptionException ()
+ : base ("Number overflow")
+ {
+ }
+
+ public OverflowExceptionException (string message)
+ : base (message)
+ {
+ }
+
+ public OverflowExceptionException (string message, Exception inner)
+ : base (message, inner)
+ {
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+//
+// System.RankException.cs
+//
+// Author:
+// Joe Shaw (joe@ximian.com)
+//
+// (C) 2001 Ximian, Inc. http://www.ximian.com
+//
+
+namespace System {
+
+ public class RankException : SystemException {
+ // Constructors
+ public RankException ()
+ : base ("Two arrays must have the same number of dimensions")
+ {
+ }
+
+ public RankException (string message)
+ : base (message)
+ {
+ }
+
+ public RankException (string message, Exception inner)
+ : base (message, inner)
+ {
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+//
+// System.StackOverflowException.cs
+//
+// Author:
+// Joe Shaw (joe@ximian.com)
+//
+// (C) 2001 Ximian, Inc. http://www.ximian.com
+//
+
+namespace System {
+
+ public class StackOverflowException : SystemException {
+ // Constructors
+ public StackOverflowException ()
+ : base ("The requested operation caused a stack overflow")
+ {
+ }
+
+ public StackOverflowException (string message)
+ : base (message)
+ {
+ }
+
+ public StackOverflowException (string message, Exception inner)
+ : base (message, inner)
+ {
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+//
+// System.SystemException.cs
+//
+// Author:
+// Joe Shaw (joe@ximian.com)
+//
+// (C) 2001 Ximian, Inc. http://www.ximian.com
+//
+
+namespace System {
+
+ public class SystemException : Exception {
+ // Constructors
+ public SystemException ()
+ : base ("A system exception has occurred.");
+ {
+ }
+
+ public SystemException (string message)
+ : base (message)
+ {
+ }
+
+ public SystemException (string message, Exception inner)
+ : base (message, inner)
+ {
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+//
+// System.TypeInitializationException.cs
+//
+// Author:
+// Joe Shaw (joe@ximian.com)
+//
+// (C) 2001 Ximian, Inc. http://www.ximian.com
+//
+
+namespace System {
+
+ public class TypeInitializationException : SystemException {
+ string type_name;
+
+ // Constructors
+ public TypeInitializationException (string type_name, Exception inner)
+ : base ("An exception was thrown by the type initializer for " + type_name, inner)
+ {
+ this.type_name = type_name;
+ }
+
+ // Properties
+ public string TypeName {
+ get {
+ return type_name;
+ }
+ }
+ }
+
+}
\ No newline at end of file
namespace System {
- public struct UInt16 : ValueType {
+ public struct UInt16 : ValueType, IComparable, IFormattable {
public const ushort MinValue = 0;
public const ushort MaxValue = 0xffff;
- short value;
+ ushort value;
public int CompareTo (object v)
{
if (!(value is System.UInt16))
- throw new ArgumentException ("Value is not a System.Int16");
+ throw new ArgumentException ("Value is not a System.UInt16");
return value - ((ushort) v);
}
return "";
}
- publig string ToString (string format, IFormatProvider fp)
+ public string ToString (string format, IFormatProvider fp)
{
// TODO: Implement me.
return "";
namespace System {
- public struct Int32 : ValueType {
+ public struct Int32 : ValueType, IComparable, IFormattable {
public const uint MinValue = 0;
public const uint MaxValue = 0xffffffff;
return "";
}
- publig string ToString (string format, IFormatProvider fp)
+ public string ToString (string format, IFormatProvider fp)
{
// TODO: Implement me.
return "";
namespace System {
- public struct UInt64 : ValueType {
+ public struct UInt64 : ValueType, IComparable, IFormattable {
public const ulong MinValue = 0;
public const ulong MaxValue = 0xffffffffffffffff;
return "";
}
- publig string ToString (string format, IFormatProvider fp)
+ public string ToString (string format, IFormatProvider fp)
{
// TODO: Implement me.
return "";