Skip to main content
.NET Framework 4.5.2+

BaseObjectSpace.GetObject<ObjectType>(ObjectType) Method

Retrieves an object from another Object Space to the current Object Space. The returned object is cast by the type designated by the specified generic type parameter.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v22.2.dll

NuGet Package: DevExpress.ExpressApp


public ObjectType GetObject<ObjectType>(
    ObjectType obj


Name Type Description
obj ObjectType

An object that represents a template object from another Object Space.

Type Parameters



Type Description

An object retrieved from the database by the current Object Space and cast by the specified type.


To return an object retrieved by the current Object Space, the GetObject<ObjectType> method invokes the BaseObjectSpace.GetObject method passing the specified object as the objectFormDifferentObjectSpace parameter. The value returned by the invoked method is cast to the type designated by the specified generic type parameter. Note that the invoked BaseObjectSpace.GetObject method does nothing and returns null (Nothing in VB). So, it should be overridden in the BaseObjectSpace class’ descendants.


See Also