Re: Design: Custom Exception Usage



"DSK Chakravarthy" <dskcheck@xxxxxxx> wrote in message
news:841424AE-11E1-4D70-B5FE-62A828B86044@xxxxxxxxxxxxxxxx
First thing first, Try to avoid the Exceptions to the extent that you can.
Use is only in case where you can't handle.


That's reasonable.

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.

The TryParse pattern has made this sort of thing legitimate but its a poor
pattern.


--
Anthony Jones - MVP ASP/ASP.NET


.



Relevant Pages

  • Re: Upgrade VB6 Error
    ... more is there any more advice that I can be given? ... "lineInitializeExA" ... > (ByRef lphLineApp As Integer, ByVal hInstance As Integer, ByVal ... > As Integer, ByVal lpszFriendlyAppName As String, ByRef lpdwNumDevs As ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Design: Custom Exception Usage
    ... That IMO isn't ... My advice would be avoid OUT or ByRef parameter like the plague. ... It is much simpler encapsulate a Foo object and any ancillary ...
    (microsoft.public.dotnet.languages.csharp)