-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TRUE and FALSE #301
Comments
Should BOOL be an enum with two values? 😱 |
There are APIs that return more than two values (most prominently GetMessage), in case thats relevant to the decision |
The quote from the doc actually made me remember that often I don't know how clean the implementation of the Windows API is in regard to nonzero Making this an enum would be taking a leap of faith since APIs are usually not documented as returning For C# projections having a struct which implicitly converts to bool by doing a nonzero check will probably be the more intuitive thing to avoid this kind of bug? |
Agreed. Let's not define an enum. I was mostly kidding on that anyway. But I learned some important things from your comments here, so thank you. |
Should the
TRUE
andFALSE
constants be of typeWindows.Win32.SystemServices.BOOL
? Currently they'reint
.The text was updated successfully, but these errors were encountered: