XPMemberInfo.GetOldValue(Object) Method
In This Article
Returns the old value of the member.
Namespace: DevExpress.Xpo.Metadata
Assembly: DevExpress.Xpo.v24.2.dll
NuGet Package: DevExpress.Xpo
#Declaration
#Parameters
Name | Type | Description |
---|---|---|
the |
Object | A persistent object for which the member value will be obtained. |
#Returns
Type | Description |
---|---|
Object | An object which is the old value of the member. |
#Remarks
C#
XPMemberInfo member = customer.ClassInfo.GetMember(propertyName);
string memberValue;
if(member.GetModified(customer)) {
memberValue = string.Format("{0} (old value: {1})", member.GetValue(customer), member.GetOldValue(customer));
}
else {
memberValue = (string)member.GetValue(customer);
}
For more information, refer to the %PUBLIC%\Documents\DevExpress Demos 24.2\Components\WinForms\CS\XpoTutorials\ModifiedProperties\ModifiedProperties.cs file.
See Also