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.v24.1.dll

NuGet Package: DevExpress.ExpressApp

Declaration

public ObjectType GetObject<ObjectType>(
    ObjectType obj
)

Parameters

Name Type Description
obj ObjectType

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

Type Parameters

Name
ObjectType

Returns

Type Description
ObjectType

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

Remarks

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.

Implements

See Also