try { object result = processClass.InvokeMethod(\"Create\", methodArgs); } catch (Exception e) { // Here I was hoping to get an error code. }
Another method would be to get the error code from the exception class directly. For example:
catch (Exception ex) { if (ex.InnerException is ServiceResponseException) { ServiceResponseException srex = ex.InnerException as ServiceResponseException; string ErrorCode = srex.ErrorCode.ToString(); } }