Ok,
I've gathered some brain dumps from the MSDN Articles on using Begin/End operations etc. However there are times when we hit the End<method> and it throws any pending Exceptions that I'm getting TargetInvocationException and I have to check the InnerException to get the real exception. Is this consistent with the rest of the methods and can I structure my exceptionhandling to always check the InnerException and only catch TargetInvokcationException for the Async handlers?
try
{
((SecureFTPConnection)ar.AsyncState).EndDownloadFile(ar);
}
catch (TargetInvocationException te)
{
if(te.InnerException is FTPTransferCancelledException)
InvokeTransferCancelledEvent();
}
Or should I still catch it? I'm a bit confused. :oops: