ThisToThat/ThisToThat/ToBooleanExtensions.cs
/// <summary>
/// Converts and returns this char's value as a nullable boolean.
/// Values which will convert to true are: 'T', 'Y', '1'
/// Values which will convert to false are: 'F', 'N', '0'
/// All other values will convert to null.
/// </summary>
Converts and returns this char's value as a nullable boolean.
Converts and returns this char ' s value as a nullable boolean .
public static bool? ToBooleanNullable(this char thisChar)
        {
            bool? returnValue = null;
            if (_TRUE_CHARS.Contains(thisChar))
                returnValue = true;
            else if (_FALSE_CHARS.Contains(thisChar))
                returnValue = false;
            return returnValue;
        }
public static bool ? ToBooleanNullable ( this char thisChar ) { bool ? returnValue = null ; if ( _TRUE_CHARS . Contains ( thisChar ) ) returnValue = true ; else if ( _FALSE_CHARS . Contains ( thisChar ) ) returnValue = false ; return returnValue ; }
Converts and returns this char's value as a nullable boolean.
Converts and returns this char ' s value as a nullable boolean .
char
this