Skip to main content
All docs
V24.2
.NET Framework 4.6.2+

PersistentBase.UseUnsafeCreateCollectionStrategy Field

Specifies whether the return value type of the XPCustomMemberInfo.GetValue method can be different than the XPCustomMemberInfo.MemberType property value.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v24.2.dll

Declaration

public static bool UseUnsafeCreateCollectionStrategy

Field Value

Type Description
Boolean

true if the XPCustomMemberInfo.GetValue method can return a value of any type. false if the XPCustomMemberInfo.GetValue method should throw the InvalidCastException when the return value type does not match the XPCustomMemberInfo.MemberType property value.

Remarks

The UseUnsafeCreateCollectionStrategy property is in effect only when the XPCustomMemberInfo.MemberType property is set to typeof(XPCollection<T>) or typeof(IList<T>). Otherwise, the XPCustomMemberInfo.GetValue method does not raise the InvalidCastException when the result value type does not match the XPCustomMemberInfo.MemberType property value.

See Also