Do not fight with the frame in which you find yourself. If you write C code where return values ββare the most common mechanism for passing errors (due to the lack of a better built-in construct), use this.
The .NET base class libraries use Exceptions for messaging, and their absence means that everything is in order. Since almost all code uses BCL, most of it will be written to wait for exceptions, unless it gets into a library written as if C # was C without exception support, each call should be wrapped in if (! MyObject .DoSomething) {System.Writeline ("Damn");} block.
For the next developer to use your code (which may be after several years when you forgot how you did it before), it will hurt to start writing all the call code to take advantage of the error conditions passed as return values, like changing values ββin the output parameter as user events, as callbacks, as messages in a queue, or any other possible way to report an error or lack thereof.
Matthew martin
source share