5 // Miguel de Icaza (miguel@ximian.com)
7 // (C) Ximian, Inc. http://www.ximian.com
10 using System.Globalization;
14 public struct UInt32 : IComparable, IFormattable { //, IConvertible {
15 public const uint MaxValue = 0xffffffff;
16 public const uint MinValue = 0;
20 public int CompareTo (object v)
22 if (!(v is System.UInt32))
23 throw new ArgumentException ("Value is not a System.UInt32");
25 if (value == (uint) v)
34 public override bool Equals (object o)
36 if (!(o is System.UInt32))
39 return ((uint) o) == value;
42 public override int GetHashCode ()
47 public static uint Parse (string s)
49 return Parse (s, NumberStyles.Integer, null);
52 public static uint Parse (string s, IFormatProvider fp)
54 return Parse (s, NumberStyles.Integer, fp);
57 public static uint Parse (string s, NumberStyles style)
59 return Parse (s, style, null);
62 public static uint Parse (string s, NumberStyles style, IFormatProvider fp)
68 public override string ToString ()
70 return ToString ("G", null);
73 public string ToString (IFormatProvider fp)
75 return ToString ("G", fp);
78 public string ToString (string format)
80 return ToString (format, null);
83 public string ToString (string format, IFormatProvider fp)
85 // TODO: Implement me.
89 // =========== IConvertible Methods =========== //
91 public TypeCode GetTypeCode ()
93 return TypeCode.UInt32;