Is there any way to extend bool.Implies (bool) in C # /. NET?

Which library is listed bool.Implies(bool)?

I would like to use it as Assert.That (a.Implies(b)).

I have an implementation, but I would prefer to use the built-in.

bool Implies(this bool a, bool b){
    return !a || b;
}
+4
source share
2 answers

I don’t think there is anything in the library. So I wrote my own.

static class myLogicExtensions {
    public static bool Implies(this bool a, bool b){
        return !a || b;
    }
}
+3
source

Imp VB 6. Support.Imp Microsoft.VisualBasic.Compatibility.VB6. , - , , .

+3

All Articles