Class.ThrowOnInitFailure Field
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Determines whether Xamarin.iOS will check in the NSObject constructor if the corresponding native object was successfully created (the default value is true).
public static bool ThrowOnInitFailure;
staticval mutable ThrowOnInitFailure : bool
Field Value
Remarks
Traditionally Xamarin.iOS has allowed managed objects to be created without a native peer. The behavior has however been inconsistent between types, and in the case of types from third-party libraries it would result in instances that would, if used, most likely crash the process with a stack overflow.
With this check the behavior will be consistent among all types.