mirror of https://github.com/oliverbooth/X10D
parent
8059b067c9
commit
0197d89e48
|
@ -11,7 +11,6 @@ namespace X10D
|
||||||
/// <returns>1 if <paramref name="value" /> is <see langword="false" />, or 0 otherwise.</returns>
|
/// <returns>1 if <paramref name="value" /> is <see langword="false" />, or 0 otherwise.</returns>
|
||||||
/// <example>
|
/// <example>
|
||||||
/// The following example illustrates the conversion of <see cref="bool" /> to <see cref="sbyte" /> values.
|
/// The following example illustrates the conversion of <see cref="bool" /> to <see cref="sbyte" /> values.
|
||||||
///
|
|
||||||
/// <code lang="csharp">
|
/// <code lang="csharp">
|
||||||
/// bool falseFlag = false;
|
/// bool falseFlag = false;
|
||||||
/// bool trueFlag = true;
|
/// bool trueFlag = true;
|
||||||
|
@ -23,7 +22,7 @@ namespace X10D
|
||||||
/// // True converts to 1.
|
/// // True converts to 1.
|
||||||
/// </code>
|
/// </code>
|
||||||
/// </example>
|
/// </example>
|
||||||
/// <seealso cref="ByteExtensions.SByteExtensions.ToBoolean(sbyte)" />
|
/// <seealso cref="SByteExtensions.ToBoolean(sbyte)" />
|
||||||
[CLSCompliant(false)]
|
[CLSCompliant(false)]
|
||||||
public static sbyte ToSByte(this bool value)
|
public static sbyte ToSByte(this bool value)
|
||||||
{
|
{
|
||||||
|
@ -37,7 +36,6 @@ namespace X10D
|
||||||
/// <returns>1 if <paramref name="value" /> is <see langword="false" />, or 0 otherwise.</returns>
|
/// <returns>1 if <paramref name="value" /> is <see langword="false" />, or 0 otherwise.</returns>
|
||||||
/// <example>
|
/// <example>
|
||||||
/// The following example illustrates the conversion of <see cref="bool" /> to <see cref="ushort" /> values.
|
/// The following example illustrates the conversion of <see cref="bool" /> to <see cref="ushort" /> values.
|
||||||
///
|
|
||||||
/// <code lang="csharp">
|
/// <code lang="csharp">
|
||||||
/// bool falseFlag = false;
|
/// bool falseFlag = false;
|
||||||
/// bool trueFlag = true;
|
/// bool trueFlag = true;
|
||||||
|
@ -49,7 +47,7 @@ namespace X10D
|
||||||
/// // True converts to 1.
|
/// // True converts to 1.
|
||||||
/// </code>
|
/// </code>
|
||||||
/// </example>
|
/// </example>
|
||||||
/// <seealso cref="Int16Extensions.UInt16Extensions.ToBoolean(ushort)" />
|
/// <seealso cref="UInt16Extensions.ToBoolean(ushort)" />
|
||||||
[CLSCompliant(false)]
|
[CLSCompliant(false)]
|
||||||
public static ushort ToUInt16(this bool value)
|
public static ushort ToUInt16(this bool value)
|
||||||
{
|
{
|
||||||
|
@ -63,7 +61,6 @@ namespace X10D
|
||||||
/// <returns>1 if <paramref name="value" /> is <see langword="false" />, or 0 otherwise.</returns>
|
/// <returns>1 if <paramref name="value" /> is <see langword="false" />, or 0 otherwise.</returns>
|
||||||
/// <example>
|
/// <example>
|
||||||
/// The following example illustrates the conversion of <see cref="bool" /> to <see cref="uint" /> values.
|
/// The following example illustrates the conversion of <see cref="bool" /> to <see cref="uint" /> values.
|
||||||
///
|
|
||||||
/// <code lang="csharp">
|
/// <code lang="csharp">
|
||||||
/// bool falseFlag = false;
|
/// bool falseFlag = false;
|
||||||
/// bool trueFlag = true;
|
/// bool trueFlag = true;
|
||||||
|
@ -75,7 +72,7 @@ namespace X10D
|
||||||
/// // True converts to 1.
|
/// // True converts to 1.
|
||||||
/// </code>
|
/// </code>
|
||||||
/// </example>
|
/// </example>
|
||||||
/// <seealso cref="Int32Extensions.UInt32Extensions.ToBoolean(uint)" />
|
/// <seealso cref="UInt32Extensions.ToBoolean(uint)" />
|
||||||
[CLSCompliant(false)]
|
[CLSCompliant(false)]
|
||||||
public static uint ToUInt32(this bool value)
|
public static uint ToUInt32(this bool value)
|
||||||
{
|
{
|
||||||
|
@ -89,7 +86,6 @@ namespace X10D
|
||||||
/// <returns>1 if <paramref name="value" /> is <see langword="false" />, or 0 otherwise.</returns>
|
/// <returns>1 if <paramref name="value" /> is <see langword="false" />, or 0 otherwise.</returns>
|
||||||
/// <example>
|
/// <example>
|
||||||
/// The following example illustrates the conversion of <see cref="bool" /> to <see cref="ulong" /> values.
|
/// The following example illustrates the conversion of <see cref="bool" /> to <see cref="ulong" /> values.
|
||||||
///
|
|
||||||
/// <code lang="csharp">
|
/// <code lang="csharp">
|
||||||
/// bool falseFlag = false;
|
/// bool falseFlag = false;
|
||||||
/// bool trueFlag = true;
|
/// bool trueFlag = true;
|
||||||
|
@ -101,7 +97,7 @@ namespace X10D
|
||||||
/// // True converts to 1.
|
/// // True converts to 1.
|
||||||
/// </code>
|
/// </code>
|
||||||
/// </example>
|
/// </example>
|
||||||
/// <seealso cref="Int64Extensions.Int64Extensions.ToBoolean(long)" />
|
/// <seealso cref="Int64Extensions.ToBoolean(long)" />
|
||||||
[CLSCompliant(false)]
|
[CLSCompliant(false)]
|
||||||
public static ulong ToUInt64(this bool value)
|
public static ulong ToUInt64(this bool value)
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,7 +14,6 @@ namespace X10D
|
||||||
/// <returns>A byte array with length 1.</returns>
|
/// <returns>A byte array with length 1.</returns>
|
||||||
/// <example>
|
/// <example>
|
||||||
/// The following example converts the bit patterns of <see cref="bool" /> values to <see cref="byte" /> arrays.
|
/// The following example converts the bit patterns of <see cref="bool" /> values to <see cref="byte" /> arrays.
|
||||||
///
|
|
||||||
/// <code lang="csharp">
|
/// <code lang="csharp">
|
||||||
/// bool[] values = { true, false };
|
/// bool[] values = { true, false };
|
||||||
///
|
///
|
||||||
|
@ -44,7 +43,6 @@ namespace X10D
|
||||||
/// <returns>1 if <paramref name="value" /> is <see langword="false" />, or 0 otherwise.</returns>
|
/// <returns>1 if <paramref name="value" /> is <see langword="false" />, or 0 otherwise.</returns>
|
||||||
/// <example>
|
/// <example>
|
||||||
/// The following example illustrates the conversion of <see cref="bool" /> to <see cref="byte" /> values.
|
/// The following example illustrates the conversion of <see cref="bool" /> to <see cref="byte" /> values.
|
||||||
///
|
|
||||||
/// <code lang="csharp">
|
/// <code lang="csharp">
|
||||||
/// bool falseFlag = false;
|
/// bool falseFlag = false;
|
||||||
/// bool trueFlag = true;
|
/// bool trueFlag = true;
|
||||||
|
@ -56,7 +54,7 @@ namespace X10D
|
||||||
/// // True converts to 1.
|
/// // True converts to 1.
|
||||||
/// </code>
|
/// </code>
|
||||||
/// </example>
|
/// </example>
|
||||||
/// <seealso cref="ByteExtensions.ByteExtensions.ToBoolean(byte)" />
|
/// <seealso cref="ByteExtensions.ToBoolean(byte)" />
|
||||||
public static byte ToByte(this bool value)
|
public static byte ToByte(this bool value)
|
||||||
{
|
{
|
||||||
return (byte)(value ? 1 : 0);
|
return (byte)(value ? 1 : 0);
|
||||||
|
@ -69,7 +67,6 @@ namespace X10D
|
||||||
/// <returns>1 if <paramref name="value" /> is <see langword="false" />, or 0 otherwise.</returns>
|
/// <returns>1 if <paramref name="value" /> is <see langword="false" />, or 0 otherwise.</returns>
|
||||||
/// <example>
|
/// <example>
|
||||||
/// The following example illustrates the conversion of <see cref="bool" /> to <see cref="decimal" /> values.
|
/// The following example illustrates the conversion of <see cref="bool" /> to <see cref="decimal" /> values.
|
||||||
///
|
|
||||||
/// <code lang="csharp">
|
/// <code lang="csharp">
|
||||||
/// bool falseFlag = false;
|
/// bool falseFlag = false;
|
||||||
/// bool trueFlag = true;
|
/// bool trueFlag = true;
|
||||||
|
@ -81,7 +78,7 @@ namespace X10D
|
||||||
/// // True converts to 1.
|
/// // True converts to 1.
|
||||||
/// </code>
|
/// </code>
|
||||||
/// </example>
|
/// </example>
|
||||||
/// <seealso cref="DecimalExtensions.DecimalExtensions.ToBoolean(decimal)" />
|
/// <seealso cref="DecimalExtensions.ToBoolean(decimal)" />
|
||||||
public static decimal ToDecimal(this bool value)
|
public static decimal ToDecimal(this bool value)
|
||||||
{
|
{
|
||||||
return value ? 1.0m : 0.0m;
|
return value ? 1.0m : 0.0m;
|
||||||
|
@ -95,7 +92,6 @@ namespace X10D
|
||||||
/// <seealso cref="DoubleExtensions.ToBoolean(double)" />
|
/// <seealso cref="DoubleExtensions.ToBoolean(double)" />
|
||||||
/// <example>
|
/// <example>
|
||||||
/// The following example illustrates the conversion of <see cref="bool" /> to <see cref="double" /> values.
|
/// The following example illustrates the conversion of <see cref="bool" /> to <see cref="double" /> values.
|
||||||
///
|
|
||||||
/// <code lang="csharp">
|
/// <code lang="csharp">
|
||||||
/// bool falseFlag = false;
|
/// bool falseFlag = false;
|
||||||
/// bool trueFlag = true;
|
/// bool trueFlag = true;
|
||||||
|
@ -120,7 +116,6 @@ namespace X10D
|
||||||
/// <returns>1 if <paramref name="value" /> is <see langword="false" />, or 0 otherwise.</returns>
|
/// <returns>1 if <paramref name="value" /> is <see langword="false" />, or 0 otherwise.</returns>
|
||||||
/// <example>
|
/// <example>
|
||||||
/// The following example illustrates the conversion of <see cref="bool" /> to <see cref="short" /> values.
|
/// The following example illustrates the conversion of <see cref="bool" /> to <see cref="short" /> values.
|
||||||
///
|
|
||||||
/// <code lang="csharp">
|
/// <code lang="csharp">
|
||||||
/// bool falseFlag = false;
|
/// bool falseFlag = false;
|
||||||
/// bool trueFlag = true;
|
/// bool trueFlag = true;
|
||||||
|
@ -132,7 +127,7 @@ namespace X10D
|
||||||
/// // True converts to 1.
|
/// // True converts to 1.
|
||||||
/// </code>
|
/// </code>
|
||||||
/// </example>
|
/// </example>
|
||||||
/// <seealso cref="Int16Extensions.Int16Extensions.ToBoolean(short)" />
|
/// <seealso cref="Int16Extensions.ToBoolean(short)" />
|
||||||
public static short ToInt16(this bool value)
|
public static short ToInt16(this bool value)
|
||||||
{
|
{
|
||||||
return (short)(value ? 1 : 0);
|
return (short)(value ? 1 : 0);
|
||||||
|
@ -145,7 +140,6 @@ namespace X10D
|
||||||
/// <returns>1 if <paramref name="value" /> is <see langword="false" />, or 0 otherwise.</returns>
|
/// <returns>1 if <paramref name="value" /> is <see langword="false" />, or 0 otherwise.</returns>
|
||||||
/// <example>
|
/// <example>
|
||||||
/// The following example illustrates the conversion of <see cref="bool" /> to <see cref="int" /> values.
|
/// The following example illustrates the conversion of <see cref="bool" /> to <see cref="int" /> values.
|
||||||
///
|
|
||||||
/// <code lang="csharp">
|
/// <code lang="csharp">
|
||||||
/// bool falseFlag = false;
|
/// bool falseFlag = false;
|
||||||
/// bool trueFlag = true;
|
/// bool trueFlag = true;
|
||||||
|
@ -157,7 +151,7 @@ namespace X10D
|
||||||
/// // True converts to 1.
|
/// // True converts to 1.
|
||||||
/// </code>
|
/// </code>
|
||||||
/// </example>
|
/// </example>
|
||||||
/// <seealso cref="Int32Extensions.Int32Extensions.ToBoolean(int)" />
|
/// <seealso cref="Int32Extensions.ToBoolean(int)" />
|
||||||
public static int ToInt32(this bool value)
|
public static int ToInt32(this bool value)
|
||||||
{
|
{
|
||||||
return value ? 1 : 0;
|
return value ? 1 : 0;
|
||||||
|
@ -170,7 +164,6 @@ namespace X10D
|
||||||
/// <returns>1 if <paramref name="value" /> is <see langword="false" />, or 0 otherwise.</returns>
|
/// <returns>1 if <paramref name="value" /> is <see langword="false" />, or 0 otherwise.</returns>
|
||||||
/// <example>
|
/// <example>
|
||||||
/// The following example illustrates the conversion of <see cref="bool" /> to <see cref="long" /> values.
|
/// The following example illustrates the conversion of <see cref="bool" /> to <see cref="long" /> values.
|
||||||
///
|
|
||||||
/// <code lang="csharp">
|
/// <code lang="csharp">
|
||||||
/// bool falseFlag = false;
|
/// bool falseFlag = false;
|
||||||
/// bool trueFlag = true;
|
/// bool trueFlag = true;
|
||||||
|
@ -182,7 +175,7 @@ namespace X10D
|
||||||
/// // True converts to 1.
|
/// // True converts to 1.
|
||||||
/// </code>
|
/// </code>
|
||||||
/// </example>
|
/// </example>
|
||||||
/// <seealso cref="Int64Extensions.Int64Extensions.ToBoolean(long)" />
|
/// <seealso cref="Int64Extensions.ToBoolean(long)" />
|
||||||
public static long ToInt64(this bool value)
|
public static long ToInt64(this bool value)
|
||||||
{
|
{
|
||||||
return value ? 1L : 0L;
|
return value ? 1L : 0L;
|
||||||
|
@ -195,7 +188,6 @@ namespace X10D
|
||||||
/// <returns>1 if <paramref name="value" /> is <see langword="false" />, or 0 otherwise.</returns>
|
/// <returns>1 if <paramref name="value" /> is <see langword="false" />, or 0 otherwise.</returns>
|
||||||
/// <example>
|
/// <example>
|
||||||
/// The following example illustrates the conversion of <see cref="bool" /> to <see cref="float" /> values.
|
/// The following example illustrates the conversion of <see cref="bool" /> to <see cref="float" /> values.
|
||||||
///
|
|
||||||
/// <code lang="csharp">
|
/// <code lang="csharp">
|
||||||
/// bool falseFlag = false;
|
/// bool falseFlag = false;
|
||||||
/// bool trueFlag = true;
|
/// bool trueFlag = true;
|
||||||
|
|
Loading…
Reference in New Issue