>Following guidelines from MSDN, I created my custom exceptions by inheriting
>from ApplicationException.
Then you may want to read this
http://blogs.msdn.com/brada/archive/.../25/96251.aspx
>Class CustomException(Message as string)
> MyBase.New(Message)
>End Class
>
>I cannot do this because I need to do some other stuff before I calculate
>the Message property. But after that line right there, there is no way to set
>the Message property.
You can put the calculations in a shared method and call it as part of
the call to the base constructor.
MyBase.New(CalculateStuff(Message))
....
Shared Function CalculateStuff(message As String) As String
Mattias
--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ |
http://www.dotnetinterop.com
Please reply only to the newsgroup.