4 ms·
C# uses the syntax `operator bool` to define conversion so sometimes they get called operator accidentally.
by Guvante 3y ago
C# uses the syntax `operator bool` to define conversion so sometimes they get called operator accidentally.
- _kst_ 3y agoYou mean it uses `operator bool` where `bool` is the target type of the conversion, yes? I have no problem with the idea that conversions are operators. My point is that the title suggests something far more general that what the body of the article actually discusses. If the title had said "Implicit Conversions" rather than "Implicit Operators", it would have been much clearer and I wouldn't have commented.