I am not clear on how to subscribe on a particulat event. Alright, in this
case, the exception a System.ArgumentException and I can catch it. But my
question is, given a System.ArgumentException, will the message property
always be the same could there be a range of exceptions within this? I
suspect the latter, so all I can do is catch a category of exceptions and
not act on a specific exception which I may want to ignore unless I check
the message property..
"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om...
web1110 <we***@comcast.net> wrote: I posted this as an add on to another post so I thought I'd repost it
here.
How do I identify an event programmatically?
Is it necessary to do a
if(e.message=="<Event description>" ) ...
to identify the particular event?
The best thing is to only subscribe events you're interested in, and
use different handlers for each of the events you want to handle
differently - that way you don't need to test in your code.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too