我指的是这个post :
private static void MyUncaughtExceptionHandler(IntPtr exception)
{
// this is not working because NSException(IntPtr) is a protected constructor
var e = new NSException(exception);
// ...
}
如何在此处创建异常?
我应该这样做吗?
NSException exception = (NSException)ObjCRuntime.Runtime.GetNSObject(handle);
最佳答案
您自己找到了正确答案:
NSException exception = (NSException) ObjCRuntime.Runtime.GetNSObject (handle);
关于c# - 从 IntPtr 创建 NSException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37525472/