C# Convert ToBoolean(String, IFormatProvider)

Description

Convert ToBoolean(String, IFormatProvider) converts the specified string representation of a logical value to its Boolean equivalent, using the specified culture-specific formatting information.

Syntax

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


public static bool ToBoolean(
  string value,
  IFormatProvider provider
)

Parameters

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

  • value - A string that contains the value of either Boolean.TrueString or Boolean.FalseString.
  • provider - An object that supplies culture-specific formatting information. This parameter is ignored.

Returns

Convert.ToBoolean(String, IFormatProvider) method returns true if value equals Boolean.TrueString, or false if value equals Boolean.FalseString or null.





















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