xpo-devexpress-dot-xpo-dot-metadata-dot-xpmemberinfo-dot-setvalue-x28-system-dot-object-system-dot-object-x29.md
When implemented in a derived class, sets the property’s value.
Namespace : DevExpress.Xpo.Metadata
Assembly : DevExpress.Xpo.v25.2.dll
NuGet Package : DevExpress.Xpo
public abstract void SetValue(
object theObject,
object theValue
)
Public MustOverride Sub SetValue(
theObject As Object,
theValue As Object
)
| Name | Type | Description |
|---|---|---|
| theObject | Object |
An object whose property value will be set.
| | theValue | Object |
An object which represents the new value for this property.
|
The following code snippets (auto-collected from DevExpress Examples) contain references to the SetValue(Object, Object) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
asp-net-mvc-grid-custom-binding-and-xpo/CS/XPCustomBindingExample/XPO/StartupHelper.cs#L40
object order = classInfo.CreateNewObject(uow);
classInfo.GetMember("ID").SetValue(order, i + 1);
classInfo.GetMember("ProductName").SetValue(order, getRandomName());
public void Clear() {
member.SetValue(host, null);
}
if (memberInfo.IsPersistent) {
memberInfo.SetValue(theObject, list[i]);
}
XPO_how-to-implement-odata4-service-with-xpo-netcore/CS/ODataService/Helpers/ApiHelper.cs#L46
var reference = uow.GetObjectByKey(memberInfo.ReferenceType, relatedKey);
memberInfo.SetValue(entity, reference);
} else {
XPO_how-to-implement-odata4-service-with-xpo/CS/ODataService/Helpers/ApiHelper.cs#L55
var reference = uow.GetObjectByKey(memberInfo.ReferenceType, relatedKey);
memberInfo.SetValue(entity, reference);
} else {
asp-net-mvc-grid-custom-binding-and-xpo/VB/XPCustomBindingExample/XPO/StartupHelper.vb#L47
Dim order As Object = classInfo.CreateNewObject(uow)
classInfo.GetMember("ID").SetValue(order, i + 1)
classInfo.GetMember("ProductName").SetValue(order, getRandomName())
Public Sub Clear() Implements IFileData.Clear
member.SetValue(host, Nothing)
End Sub
XPO_how-to-clone-a-persistent-object-e804/VB/SimpleObject/CloneHelper.vb#L63
End If
memberInfo.SetValue(target, clonedValue)
End Sub
See Also