Table of Contents

Class BooleanExtensions

Namespace
MADE.Data.Converters.Extensions
Assembly
MADE.Data.Converters.dll

Defines a collection of extensions for bool values.

public static class BooleanExtensions
Inheritance
BooleanExtensions
Inherited Members

Methods

ToFormattedString(bool, string, string)

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

public static string ToFormattedString(this bool value, string trueValue = "True", string falseValue = "False")

Parameters

value bool

The bool value to format.

trueValue string

The string format for when the value is true.

falseValue string

The string format for when the value is false.

Returns

string

A formatted string

ToFormattedString(bool?, string, string, string)

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

public static string ToFormattedString(this bool? value, string trueValue = "True", string falseValue = "False", string nullValue = "Not set")

Parameters

value bool?

The bool value to format.

trueValue string

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

falseValue string

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

nullValue string

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

Returns

string

A formatted string