Szerkesztés

Megosztás a következőn keresztül:


Class.ThrowOnInitFailure Field

Definition

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.

Applies to