.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

FriendlyKeyPropertyAttribute.FindFriendlyKeyMemberName(ITypeInfo, Boolean) Method

Returns the name of the persistent property which the system uses as an identifier-like property for a specific type.

Namespace: DevExpress.Persistent.Base

Assembly: DevExpress.ExpressApp.v21.1.dll

Declaration

public static string FindFriendlyKeyMemberName(
    ITypeInfo typeInfo,
    bool recursive
)

Parameters

Name Type Description
typeInfo ITypeInfo

An ITypeInfo object which supplies metadata on the required type.

recursive Boolean

true, to take into account inherited FriendlyKeyPropertyAttribute attributes; otherwise, false.

Returns

Type Description
String

A string holding the name of the persistent property which the system uses as an identifier-like property for a specific type.

Remarks

If the FriendlyKeyPropertyAttribute is not applied to a class or its ancestors, the FindFriendlyKeyMemberName method returns null (Nothing in VB).

See Also