Re: Design: Custom Exception Usage



On Tue, 08 Apr 2008 04:28:47 -0700, Anthony Jones <Ant@xxxxxxxxxxxxxxxx> wrote:

[...]
Secondly, when you want to propogate any messages back to the calling
method, use OUT parameter from C# or use ByRef at VB.NET

That IMO isn't

My advice would be avoid OUT or ByRef parameter like the plague.

Hmmm...

While I'd agree that in this thread, the suggestion to use a by-reference parameter doesn't make much sense (exceptions are meant to be thrown :) ), I wouldn't say that the general technique should be avoided "like the plague". There are too many examples of situations in which a by-reference parameter is useful and not at all harmful for a broad generalization like that to be valid.

Pete
.


Loading