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
}
ExtensionMethod.NET Home of 880 C#, Visual Basic, F# and Javascript extension methods
Returns 'true' if a Boolean value is true.
public static bool IsTrue(this bool value)
{
return value;
}
if ((input == 42).IsTrue())
{
// handle the case when input is 42
}