diff --git a/X10D/src/BooleanExtensions.cs b/X10D/src/BooleanExtensions.cs index 4c5f9e1..b16ba83 100644 --- a/X10D/src/BooleanExtensions.cs +++ b/X10D/src/BooleanExtensions.cs @@ -65,23 +65,43 @@ } /// - /// Gets an integer value that represents this boolean. + /// Gets the value of this boolean as represented by . /// /// The boolean. - /// Returns 1 if is , 0 otherwise. + /// Returns 1 if is , or 0 otherwise. + public static byte ToByte(this bool value) + { + return (byte)value.ToInt32(); + } + + /// + /// Gets the value of this boolean as represented by . + /// + /// The boolean. + /// Returns 1 if is , or 0 otherwise. + public static short ToInt16(this bool value) + { + return (short)value.ToInt32(); + } + + /// + /// Gets the value of this boolean as represented by . + /// + /// The boolean. + /// Returns 1 if is , or 0 otherwise. public static int ToInt32(this bool value) { return value ? 1 : 0; } /// - /// Gets a byte value that represents this boolean. + /// Gets the value of this boolean as represented by . /// /// The boolean. - /// Returns 00000001 if is , otherwise 0000000. - public static byte ToByte(this bool value) + /// Returns 1 if is , 0 otherwise. + public static long ToInt64(this bool value) { - return (byte)(value ? 1 : 0); + return value.ToInt32(); } ///