I've been playing around with Invoke
method and realized when an exception is thrown in the target method, a TargetInvokationException
raises actually. I don't understand why C# creators used this approach. It doesn't make sense to me.
I mean, why not throw the original Exception instead of throwing a secondary exception having the original one as its InnerException?
Aucun commentaire:
Enregistrer un commentaire