All docs
V21.1
21.2 (EAP/Beta)
21.1
20.2
The page you are viewing does not exist in version 20.2. This link will take you to the root page.
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

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.v21.1.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