It's a more concise way of writing: GetConsoleCP() != 0You can do this in C/C++ as well (and presumably some other languages).Hmmm... thinking about it, it does make perfect sense. The first ! converts it to bool, the other inverts it back to it's positive/negative state.
Wouldn't this just be the same as auto hasConsole = cast(bool) GetConsoleCP(); ?I think the GetConsoleCP() != 0 code is the clearest about your intentions.