Thread: NullableTypes/src/Types NullableGuid.cs,1.6,1.7
Status: Inactive
Brought to you by:
lukadotnet
From: Damien G. <dam...@us...> - 2005-10-11 09:55:43
|
Update of /cvsroot/nullabletypes/NullableTypes/src/Types In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2446/src/Types Modified Files: NullableGuid.cs Log Message: Clean up NullableGuid and add missing XML documentation. Index: NullableGuid.cs =================================================================== RCS file: /cvsroot/nullabletypes/NullableTypes/src/Types/NullableGuid.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** NullableGuid.cs 26 Sep 2005 13:34:17 -0000 1.6 --- NullableGuid.cs 11 Oct 2005 09:55:44 -0000 1.7 *************** *** 13,16 **** --- 13,17 ---- // 05-Sep-2005 DamienG Upgrade Added new Empty handling as per NullableString. // 26-Sep-2005 DamienG Bugfix Change ToNullableString to cast via NullableString. + // 11-Oct-2005 DamienG Upgrade Clean up and add missing XML documentation. // *************** *** 21,31 **** using sysXmlScm = System.Xml.Schema; [sys.Serializable] public struct NullableGuid : INullable, sys.IComparable, sysXmlSrl.IXmlSerializable { #region Fields ! sys.Guid _value; private bool _notNull; public static readonly NullableGuid Null; public static readonly NullableGuid Empty = new NullableGuid(System.Guid.Empty); --- 22,42 ---- using sysXmlScm = System.Xml.Schema; + /// <summary> + /// Represents a globally unique identifier that is either a a <see cref="System.Guid"/> or <see cref="Null"/>. + /// </summary> [sys.Serializable] public struct NullableGuid : INullable, sys.IComparable, sysXmlSrl.IXmlSerializable { + #region Fields ! ! private sys.Guid _value; private bool _notNull; + /// Represents the null <see cref="NullableGuid"/>. This field is read-only. public static readonly NullableGuid Null; + + /// <summary> + /// Represents the empty <see cref="NullableGuid"/> value. This field is read-only. + /// </summary> public static readonly NullableGuid Empty = new NullableGuid(System.Guid.Empty); *************** *** 33,51 **** #region Constructors ! public NullableGuid (byte[] value) { ! _value = new sys.Guid (value); _notNull = true; } ! public NullableGuid (sys.Guid g) { ! _value = g; _notNull = true; } ! public NullableGuid (string s) { ! _value = new sys.Guid (s); _notNull = true; } public NullableGuid(int a, short b, short c, byte[] d) { _value = new sys.Guid(a, b, c, d); --- 44,88 ---- #region Constructors ! ! /// <summary> ! /// Initializes a new instance of the class using the <see cref="System.Guid"/> specified. ! /// </summary> ! /// <param name="g">A <see cref="System.Guid"/>.</param> ! public NullableGuid(sys.Guid g) { ! _value = g; _notNull = true; } ! /// <summary> ! /// Initializes a new instance of the class using the specified array of bytes. ! /// </summary> ! /// <param name="b">A 16 element byte array containing values with which to initialize the Guid.</param> ! /// <exception cref="System.ArgumentNullException"><paramref name="b"/> is <see cref="Null"/>.</exception> ! /// <exception cref="System.ArgumentException"><paramref name="b"/> is not 16 bytes long.</exception> ! public NullableGuid(byte[] b) { ! _value = new sys.Guid (b); _notNull = true; } ! /// <summary> ! /// Initializes a new instance of the Guid class using the value represented by the specified string. ! /// </summary> ! /// <param name="g">A <see cref="System.String"/> that contains a Guid in an acceptible format for <see cref="System.TimeSpan"/>.</param> ! /// <exception cref="System.ArgumentNullException"><paramref name="g"/> is <see cref="Null"/>.</exception> ! /// <exception cref="System.FormatException">The format of <paramref name="g"/> is invalid.</exception> ! public NullableGuid(string g) { ! _value = new sys.Guid(g); _notNull = true; } + /// <summary> + /// Initializes a new instance of the class using the specified integers and byte array. + /// </summary> + /// <param name="a">The first 4 bytes of the GUID.</param> + /// <param name="b">The next 2 bytes of the GUID.</param> + /// <param name="c">The next 2 bytes of the GUID.</param> + /// <param name="d">The remaining 8 bytes of the GUID.</param> + /// <exception cref="System.ArgumentNullException"><paramref name="d"/> is <see langword="null"/>.</exception> + /// <exception cref="System.ArgumentException"><paramref name="d"/>d is not 8 bytes long.</exception> public NullableGuid(int a, short b, short c, byte[] d) { _value = new sys.Guid(a, b, c, d); *************** *** 53,79 **** } public NullableGuid (int a, short b, short c, byte d, byte e, byte f, byte g, byte h, byte i, byte j, byte k) { _value = new sys.Guid (a, b, c, d, e, f, g, h, i, j, k); _notNull = true; } #endregion // Constructors #region INullable public bool IsNull { get { return !_notNull; } } #endregion // INullable #region IComparable - Ordering ! public int CompareTo(object value) { ! if (value == null) ! return 1; ! else if (!(value is NullableGuid)) throw new sys.ArgumentException(string.Format(Locale.GetText("Value is not a {0}."), "NullableTypes.NullableGuid")); ! else if (((NullableGuid)value).IsNull) ! return 1; ! else ! return _value.CompareTo(((NullableGuid)value).Value); } --- 90,145 ---- } + /// <summary> + /// Initializes a new instance of the class using the specified integers and bytes. + /// </summary> + /// <param name="a">The first 4 bytes of the GUID.</param> + /// <param name="b">The next 2 bytes of the GUID.</param> + /// <param name="c">The next 2 bytes of the GUID.</param> + /// <param name="d">The next byte of the GUID.</param> + /// <param name="e">The next byte of the GUID.</param> + /// <param name="f">The next byte of the GUID.</param> + /// <param name="g">The next byte of the GUID.</param> + /// <param name="h">The next byte of the GUID.</param> + /// <param name="i">The next byte of the GUID.</param> + /// <param name="j">The next byte of the GUID.</param> + /// <param name="k">The next byte of the GUID.</param> public NullableGuid (int a, short b, short c, byte d, byte e, byte f, byte g, byte h, byte i, byte j, byte k) { _value = new sys.Guid (a, b, c, d, e, f, g, h, i, j, k); _notNull = true; } + #endregion // Constructors #region INullable + /// <summary> + /// Indicates whether or not the value of the <see cref="NullableGuid"/> + /// structure is null. + /// </summary> + /// <value> + /// true if the <see cref="NullableGuid"/> structure is null, otherwise + /// false. + /// </value> public bool IsNull { get { return !_notNull; } } + #endregion // INullable #region IComparable - Ordering ! ! /// <summary> ! /// Compares this instance to a specified object and returns an indication of their relative values. ! /// </summary> ! /// <param name="o">An object to compare, or <see langword="null"/>.</param> ! /// <returns></returns> ! /// <exception cref="System.ArgumentException"><paramref name="o"/> is not a <see cref="NullableGuid"/>.</exception> ! public int CompareTo(object o) { ! if (o == null)return 1; ! if (!(o is NullableGuid)) throw new sys.ArgumentException(string.Format(Locale.GetText("Value is not a {0}."), "NullableTypes.NullableGuid")); ! ! NullableGuid g = (NullableGuid) o; ! return (g.IsNull) ? 1 : _value.CompareTo(g.Value); } *************** *** 81,123 **** #region Equivalence - public override bool Equals(object value) { - if (!(value is NullableGuid)) - return false; - else if (this.IsNull && ((NullableGuid)value).IsNull) - return true; - else if (this.IsNull) - return false; - else if (((NullableGuid)value).IsNull) - return false; - else - return (bool) (this == (NullableGuid)value); - } ! public static NullableBoolean NotEquals(NullableGuid x, NullableGuid y) { ! return (x != y); } ! public static NullableBoolean operator == (NullableGuid x, NullableGuid y) { ! if (x.IsNull || y.IsNull) return NullableBoolean.Null; ! return new NullableBoolean (x.Value == y.Value); } ! public static NullableBoolean operator != (NullableGuid x, NullableGuid y) { ! if (x.IsNull || y.IsNull) return NullableBoolean.Null; ! return new NullableBoolean (!(x.Value == y.Value)); } ! public static NullableBoolean Equals(NullableGuid x, NullableGuid y) { ! return (x == y); } - public override int GetHashCode() { - System.Guid tmp = (IsNull) ? System.Guid.Empty : _value; - - return tmp.GetHashCode(); - } #endregion // Equivalence #region IXmlSerializable /// <summary> /// This member supports the .NET Framework infrastructure and is not intended to be used directly --- 147,206 ---- #region Equivalence ! /// <summary> ! /// Returns a value indicating whether this instance is equal to a specified object. ! /// </summary> ! /// <param name="o">An object to compare with this instance.</param> ! /// <returns>true if value is a <see cref="NullableGuid"/> that represents the same time as this instance; otherwise, false.</returns> ! public override bool Equals(object o) { ! if (!(o is NullableGuid)) return false; ! NullableGuid g = (NullableGuid) o; ! if (IsNull && g.IsNull) return true; ! if (IsNull || g.IsNull) return false; ! return (bool) (this == g); } ! /// <summary> ! /// Returns an indication whether the values of two specified <see cref="NullableGuid"/> objects are equal. ! /// </summary> ! /// <param name="g1">A <see cref="NullableGuid"/> object.</param> ! /// <param name="g2">A <see cref="NullableGuid"/> object.</param> ! /// <see cref="NullableBoolean.Null"/> if either <paramref name="g1"/> or <paramref name="g2"/> are <see cref="Null"/>, ! /// <see cref="NullableBoolean.True"/> if the values of <paramref name="g1"/> and <paramref name="g2"/> are equal, ! /// <see cref="NullableBoolean.False"/> if the values of <paramref name="g1"/> and <paramref name="g2"/> are not equal. ! public static NullableBoolean operator == (NullableGuid g1, NullableGuid g2) { ! if (g1.IsNull || g2.IsNull) return NullableBoolean.Null; ! return new NullableBoolean (g1.Value == g2.Value); } ! /// <summary> ! /// Returns an indication whether the values of two specified <see cref="NullableGuid"/> objects are not equal. ! /// </summary> ! /// <param name="g1">A <see cref="NullableGuid"/> object.</param> ! /// <param name="g2">A <see cref="NullableGuid"/> object.</param> ! /// <see cref="NullableBoolean.Null"/> if either <paramref name="g1"/> or <paramref name="g2"/> are <see cref="Null"/>, ! /// <see cref="NullableBoolean.True"/> if the values of <paramref name="g1"/> and <paramref name="g2"/> are not equal, ! /// <see cref="NullableBoolean.False"/> if the values of <paramref name="g1"/> and <paramref name="g2"/> are equal. ! public static NullableBoolean operator != (NullableGuid g1, NullableGuid g2) { ! if (g1.IsNull || g2.IsNull) return NullableBoolean.Null; ! return new NullableBoolean (!(g1.Value == g2.Value)); } ! /// <summary> ! /// Indicates whether two <see cref="NullableGuid"/> instances are equal. ! /// </summary> ! /// <param name="g1">A <see cref="NullableGuid"/>.</param> ! /// <param name="g2">A <see cref="NullableGuid"/>.</param> ! /// <see cref="NullableBoolean.Null"/> if either <paramref name="g1"/> or <paramref name="g2"/> are <see cref="Null"/>, ! /// <see cref="NullableBoolean.True"/> if the values of <paramref name="g1"/> and <paramref name="g2"/> are equal, ! /// <see cref="NullableBoolean.False"/> if the values of <paramref name="g1"/> and <paramref name="g2"/> are not equal. ! public static NullableBoolean Equals(NullableGuid g1, NullableGuid g2) { ! return (g1 == g2); } #endregion // Equivalence #region IXmlSerializable + /// <summary> /// This member supports the .NET Framework infrastructure and is not intended to be used directly *************** *** 180,189 **** _notNull = false; } #endregion // IXmlSerializable #region Properties public sys.Guid Value { get { ! if (this.IsNull) throw new NullableNullValueException(); --- 263,278 ---- _notNull = false; } + #endregion // IXmlSerializable #region Properties + + /// <summary> + /// Contains the <see cref="System.Guid"/> this instance represents if it is not <see cref="Null"/>. + /// </summary> + /// <exception cref="NullableNullValueException">instance is <see cref="Null"/>.</exception> public sys.Guid Value { get { ! if (IsNull) throw new NullableNullValueException(); *************** *** 191,269 **** } } #endregion // Properties #region Methods ! public static NullableBoolean GreaterThan(NullableGuid x, NullableGuid y) { ! return (x > y); } ! public static NullableBoolean GreaterThanOrEqual(NullableGuid x, NullableGuid y) { ! return (x >= y); } ! public static NullableBoolean LessThan(NullableGuid x, NullableGuid y) { ! return (x < y); } ! public static NullableBoolean LessThanOrEqual(NullableGuid x, NullableGuid y) { ! return (x <= y); } ! public static NullableGuid Parse(string s) { ! return new NullableGuid (s); } #endregion // Methods #region Operators - public static NullableBoolean operator > (NullableGuid x, NullableGuid y) { - if (x.IsNull || y.IsNull) - return NullableBoolean.Null; ! if (x.Value.CompareTo (y.Value) > 0) ! return new NullableBoolean (true); else ! return new NullableBoolean (false); } ! public static NullableBoolean operator >= (NullableGuid x, NullableGuid y) { ! if (x.IsNull || y.IsNull) return NullableBoolean.Null; - - if (x.Value.CompareTo (y.Value) >= 0) - return new NullableBoolean (true); else ! return new NullableBoolean (false); } ! public static NullableBoolean operator < (NullableGuid x, NullableGuid y) { ! if (x.IsNull || y.IsNull) return NullableBoolean.Null; - - if (x.Value.CompareTo (y.Value) < 0) - return new NullableBoolean (true); else ! return new NullableBoolean (false); } ! public static NullableBoolean operator <= (NullableGuid x, NullableGuid y) { ! if (x.IsNull || y.IsNull) return NullableBoolean.Null; - - if (x.Value.CompareTo (y.Value) <= 0) - return new NullableBoolean (true); else ! return new NullableBoolean (false); } #endregion // Operators #region Conversion Operators public static explicit operator sys.Guid(NullableGuid x) { return x.Value; } public static explicit operator NullableGuid(NullableString x) { return new NullableGuid (x.Value); } public static implicit operator NullableGuid(sys.Guid x) { return new NullableGuid (x); --- 280,475 ---- } } + #endregion // Properties #region Methods ! ! /// <summary> ! /// Indicates whether a specified <see cref="NullableGuid"/> is greater than another specified <see cref="NullableGuid"/>. ! /// </summary> ! /// <param name="g1">A <see cref="NullableGuid"/>.</param> ! /// <param name="g2">A <see cref="NullableGuid"/>.</param> ! /// <returns> ! /// <see cref="NullableBoolean.True"/> if <paramref name="g1"/> is greater than <paramref name="g2"/>, ! /// <see cref="NullableBoolean.Null"/> if one or both of the instances are NullableGuid.Null, ! /// <see cref="NullableBoolean.False"/> if <paramref name="g1"/> is less than or equal to <paramref name="g2"/>. ! /// </returns> ! public static NullableBoolean GreaterThan(NullableGuid g1, NullableGuid g2) { ! return (g1 > g2); } ! /// <summary> ! /// Indicates whether a specified <see cref="NullableGuid"/> is greater than or equal to another specified <see cref="NullableGuid"/>. ! /// </summary> ! /// <param name="g1">A <see cref="NullableGuid"/>.</param> ! /// <param name="g2">A <see cref="NullableGuid"/>.</param> ! /// <returns> ! /// <see cref="NullableBoolean.True"/> if <paramref name="g1"/> is greater than or equal to <paramref name="g2"/>, ! /// <see cref="NullableBoolean.Null"/> if one or both of the instances are NullableGuid.Null, ! /// <see cref="NullableBoolean.False"/> if <paramref name="g1"/> is less than <paramref name="g2"/>. ! /// </returns> ! public static NullableBoolean GreaterThanOrEqual(NullableGuid g1, NullableGuid g2) { ! return (g1 >= g2); } ! /// <summary> ! /// Indicates whether a specified <see cref="NullableGuid"/> is less than another specified <see cref="NullableGuid"/>. ! /// </summary> ! /// <param name="g1">A <see cref="NullableGuid"/>.</param> ! /// <param name="g2">A <see cref="NullableGuid"/>.</param> ! /// <returns> ! /// <see cref="NullableBoolean.True"/> if <paramref name="g1"/> is less than <paramref name="g2"/>, ! /// <see cref="NullableBoolean.Null"/> if one or both of the instances are NullableGuid.Null, ! /// <see cref="NullableBoolean.False"/> if <paramref name="g1"/> is greater than or equal to <paramref name="g2"/>. ! /// </returns> ! public static NullableBoolean LessThan(NullableGuid g1, NullableGuid g2) { ! return (g1 < g2); } ! /// <summary> ! /// Indicates whether a specified <see cref="NullableGuid"/> is less than another specified <see cref="NullableGuid"/>. ! /// </summary> ! /// <param name="g1">A <see cref="NullableGuid"/>.</param> ! /// <param name="g2">A <see cref="NullableGuid"/>.</param> ! /// <returns> ! /// <see cref="NullableBoolean.True"/> if <paramref name="g1"/> is less than <paramref name="g2"/>, ! /// <see cref="NullableBoolean.Null"/> if one or both of the instances are NullableGuid.Null, ! /// <see cref="NullableBoolean.False"/> if <paramref name="g1"/> is greater than or equal to <paramref name="g2"/>. ! /// </returns> ! public static NullableBoolean LessThanOrEqual(NullableGuid g1, NullableGuid g2) { ! return (g1 <= g2); } ! /// <summary> ! /// Returns a hash code for this instance. ! /// </summary> ! /// <returns>A 32-bit signed integer hash code.</returns> ! public override int GetHashCode() ! { ! System.Guid tmp = (IsNull) ? System.Guid.Empty : _value; ! return tmp.GetHashCode(); } + #endregion // Methods #region Operators ! /// <summary> ! /// Indicates whether a specified <see cref="NullableGuid"/> is greater than another specified <see cref="NullableGuid"/>. ! /// </summary> ! /// <param name="g1">A <see cref="NullableGuid"/>.</param> ! /// <param name="g2">A <see cref="NullableGuid"/>.</param> ! /// <returns> ! /// <see cref="NullableBoolean.True"/> if <paramref name="g1"/> is greater than <paramref name="g2"/>, ! /// <see cref="NullableBoolean.Null"/> if one or both of the instances are NullableGuid.Null, ! /// <see cref="NullableBoolean.False"/> if <paramref name="g1"/> is less than or equal to <paramref name="g2"/>. ! /// </returns> ! public static NullableBoolean operator > (NullableGuid g1, NullableGuid g2) { ! if (g1.IsNull || g2.IsNull) ! return NullableBoolean.Null; else ! return new NullableBoolean(g1.Value.CompareTo(g2.Value) > 0); } ! /// <summary> ! /// Indicates whether a specified <see cref="NullableGuid"/> is greater than or equal to another specified <see cref="NullableGuid"/>. ! /// </summary> ! /// <param name="g1">A <see cref="NullableGuid"/>.</param> ! /// <param name="g2">A <see cref="NullableGuid"/>.</param> ! /// <returns> ! /// <see cref="NullableBoolean.True"/> if <paramref name="g1"/> is greater than or equal to <paramref name="g2"/>, ! /// <see cref="NullableBoolean.Null"/> if one or both of the instances are NullableGuid.Null, ! /// <see cref="NullableBoolean.False"/> if <paramref name="g1"/> is less than <paramref name="g2"/>. ! /// </returns> ! public static NullableBoolean operator >= (NullableGuid g1, NullableGuid g2) { ! if (g1.IsNull || g2.IsNull) return NullableBoolean.Null; else ! return new NullableBoolean(g1.Value.CompareTo(g2.Value) >= 0); } ! /// <summary> ! /// Indicates whether a specified <see cref="NullableGuid"/> is less than another specified <see cref="NullableGuid"/>. ! /// </summary> ! /// <param name="g1">A <see cref="NullableGuid"/>.</param> ! /// <param name="g2">A <see cref="NullableGuid"/>.</param> ! /// <returns> ! /// <see cref="NullableBoolean.True"/> if <paramref name="g1"/> is less than <paramref name="g2"/>, ! /// <see cref="NullableBoolean.Null"/> if one or both of the instances are NullableGuid.Null, ! /// <see cref="NullableBoolean.False"/> if <paramref name="g1"/> is greater than or equal to <paramref name="g2"/>. ! /// </returns> ! public static NullableBoolean operator < (NullableGuid g1, NullableGuid g2) { ! if (g1.IsNull || g2.IsNull) return NullableBoolean.Null; else ! return new NullableBoolean(g1.Value.CompareTo(g2.Value) < 0); } ! /// <summary> ! /// Indicates whether a specified <see cref="NullableGuid"/> is less than another specified <see cref="NullableGuid"/>. ! /// </summary> ! /// <param name="g1">A <see cref="NullableGuid"/>.</param> ! /// <param name="g2">A <see cref="NullableGuid"/>.</param> ! /// <returns> ! /// <see cref="NullableBoolean.True"/> if <paramref name="g1"/> is less than <paramref name="g2"/>, ! /// <see cref="NullableBoolean.Null"/> if one or both of the instances are NullableGuid.Null, ! /// <see cref="NullableBoolean.False"/> if <paramref name="g1"/> is greater than or equal to <paramref name="g2"/>. ! /// </returns> ! public static NullableBoolean operator <= (NullableGuid g1, NullableGuid g2) { ! if (g1.IsNull || g2.IsNull) return NullableBoolean.Null; else ! return new NullableBoolean(g1.Value.CompareTo(g2.Value) <= 0); } + #endregion // Operators #region Conversion Operators + + /// <summary> + /// Converts the specified <see cref="NullableGuid"/> to a <see cref="System.Guid"/>. + /// </summary> + /// <param name="x">A <see cref="NullableGuid"/> to convert.</param> + /// <returns> + /// A <see cref="System.Guid"/> set to the <see cref="Value"/> of the + /// <see cref="NullableGuid"/>. + /// </returns> + /// <exception cref="NullableNullValueException"> + /// <paramref name="x"/> is <see cref="Null"/>. + /// </exception> public static explicit operator sys.Guid(NullableGuid x) { return x.Value; } + /// <summary> + /// Converts the specified <see cref="NullableString"/> to a <see cref="NullableGuid"/>. + /// </summary> + /// <param name="x">A <see cref="NullableString"/> to convert.</param> + /// <returns> + /// <see cref="Null"/> if <paramref name="x"/> is + /// <see cref="NullableString.Null"/> otherwise a new + /// <see cref="NullableGuid"/> containing the parsed value. + /// </returns> + /// <exception cref="System.ArgumentException"> + /// <paramref name="x"/> is <see langword="null" />. + /// </exception> + /// <exception cref="System.FormatException"> + /// <paramref name="x"/> does not consist solely of an optional sign followed + /// by a sequence of digits ranging from 0 to 9. + /// </exception> public static explicit operator NullableGuid(NullableString x) { return new NullableGuid (x.Value); } + /// <summary> + /// Converts the specified <see cref="System.Guid"/> to a <see cref="NullableGuid"/>. + /// </summary> + /// <param name="x"> + /// A <see cref="System.TimeSpan"/> to convert. + /// </param> + /// <returns> + /// A new <see cref="NullableGuid"/> structure constructed from + /// <paramref name="x"/>. + /// </returns> public static implicit operator NullableGuid(sys.Guid x) { return new NullableGuid (x); *************** *** 274,291 **** #region Conversions public byte[] ToByteArray() { ! return _value.ToByteArray (); } public NullableString ToNullableString () { ! return (NullableString) this; } public override string ToString () { ! if (this.IsNull) ! return string.Empty; ! else ! return _value.ToString (); } #endregion // Conversions } --- 480,508 ---- #region Conversions + /// <summary> + /// Returns a 16-element byte array that contains the value of the <see cref="System.Guid"/>. + /// </summary> + /// <returns>A 16-element byte array.</returns> public byte[] ToByteArray() { ! return Value.ToByteArray (); } + /// <summary> + /// Returns the <see cref="NullableString"/> representation of this instance. + /// </summary> + /// <returns>A <see cref="NullableString"/> that represents this instance.</returns> public NullableString ToNullableString () { ! return (NullableString) this; } + /// <summary> + /// Returns the string representation of the value of this instance. + /// </summary> + /// <returns>A string that represents this instance.</returns> public override string ToString () { ! if (IsNull) return string.Empty; ! return Value.ToString (); } + #endregion // Conversions } |