C# Convert ToBoolean(Object, IFormatProvider)

Description

Convert ToBoolean(Object, IFormatProvider) converts the value of the specified object to an equivalent Boolean value, using the specified culture-specific formatting information.

Syntax

Convert.ToBoolean(Object, IFormatProvider) has the following syntax.


public static bool ToBoolean(
  Object value,
  IFormatProvider provider
)

Parameters

Convert.ToBoolean(Object, IFormatProvider) has the following parameters.

  • value - An object that implements the IConvertible interface, or null.
  • provider - An object that supplies culture-specific formatting information.

Returns

Convert.ToBoolean(Object, IFormatProvider) method returns true or false, which reflects the value returned by invoking the IConvertible.ToBoolean method for the underlying type of value. If value is null, the method returns false.





















Home »
  C# Tutorial »
    System »




Array
BitConverter
Boolean
Byte
Char
Console
ConsoleKeyInfo
Convert
DateTime
DateTimeOffset
Decimal
Double
Enum
Environment
Exception
Guid
Int16
Int32
Int64
Math
OperatingSystem
Random
SByte
Single
String
StringComparer
TimeSpan
TimeZone
TimeZoneInfo
Tuple
Tuple
Tuple
Type
UInt16
UInt32
UInt64
Uri
Version