ToInt method

int ToInt()

Converts the boolean to an integer (1 for true, 0 for false), matching C behavior.

Implementation

int ToInt() => this ? 1 : 0;