ExtensionMethod.NET Home of 818 C#, Visual Basic, F# and Javascript extension methods

IsTrue

Returns 'true' if a Boolean value is true.

Source

public static bool IsTrue(this bool value)
{
    return value;
}

Example

if ((input == 42).IsTrue())
{
    // handle the case when input is 42
}

Author: Bradley Grainger

Submitted on: 6 jun 2015

Language: C#

Type: bool

Views: 2690