Search Results for

    Show / Hide Table of Contents

    Class BooleanExtensions

    Defines a collection of extensions for values.

    Inheritance
    System.Object
    BooleanExtensions
    Namespace: MADE.Data.Converters.Extensions
    Assembly: MADE.Data.Converters.dll
    Syntax
    public static class BooleanExtensions : object

    Methods

    | Improve this Doc View Source

    ToFormattedString(Boolean, String, String)

    Converts a value to a value with optional true/false values.

    Declaration
    public static string ToFormattedString(this bool value, string trueValue = "True", string falseValue = "False")
    Parameters
    Type Name Description
    System.Boolean value

    The value to format.

    System.String trueValue

    The format for when the value is true.

    System.String falseValue

    The format for when the value is false.

    Returns
    Type Description
    System.String

    A formatted string

    | Improve this Doc View Source

    ToFormattedString(Nullable<Boolean>, String, String, String)

    Converts a nullable value to a value with optional true/false/null values.

    Declaration
    public static string ToFormattedString(this bool? value, string trueValue = "True", string falseValue = "False", string nullValue = "Not set")
    Parameters
    Type Name Description
    System.Nullable<System.Boolean> value

    The value to format.

    System.String trueValue

    The format for when the value is true. Default, True.

    System.String falseValue

    The format for when the value is false. Default, False.

    System.String nullValue

    The format for when the value is null. Default, Not set.

    Returns
    Type Description
    System.String

    A formatted string

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright (c) MADE Apps