The requested page is not available for the requested platform. You are viewing the content for Default platform.

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

Declaration

public ObjectType GetObject<ObjectType>(
    ObjectType obj
)
Public Function GetObject(Of ObjectType)(
    obj As ObjectType
) As ObjectType

Parameters

Name Type Description
obj ObjectType

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

Returns

Type Description
ObjectType

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

Type Parameters

Name Description
ObjectType

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.

See Also