BooleanExtensionToString Method (NullableBoolean, IFormatProvider, String, String, String) |
Returns a string description for a boolean value.
Namespace: ArtDatabankenAssembly: ArtDatabanken (in ArtDatabanken.dll) Version: 1.3.0.0 (1.3.0.0)
Syntax public static string ToString(
this Nullable<bool> value,
IFormatProvider provider,
string trueValue,
string falseValue,
string defaultValue
)
<ExtensionAttribute>
Public Shared Function ToString (
value As Nullable(Of Boolean),
provider As IFormatProvider,
trueValue As String,
falseValue As String,
defaultValue As String
) As String
public:
[ExtensionAttribute]
static String^ ToString(
Nullable<bool> value,
IFormatProvider^ provider,
String^ trueValue,
String^ falseValue,
String^ defaultValue
)
[<ExtensionAttribute>]
static member ToString :
value : Nullable<bool> *
provider : IFormatProvider *
trueValue : string *
falseValue : string *
defaultValue : string -> string
Parameters
- value
- Type: SystemNullableBoolean
The boolean value. - provider
- Type: SystemIFormatProvider
The format provider.
If null the default provider is used.
- trueValue
- Type: SystemString
The textual value to be returned if the current boolean is true. - falseValue
- Type: SystemString
The textual value to be returned if the current boolean is false. - defaultValue
- Type: SystemString
The string to show when the value is null.
Return Value
Type:
StringA string representation of the current boolean value.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
NullableBoolean. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also