How to cast entityObjects to a DraftSight entity?

Using DraftSight API with VB.NET.

I have a layer that has numerous entities (RichLines, Lines, Polylines, Circles, arcs). I need to get a list or array or collection of these objects and do things with them. Each kind of DraftSight entity has different properties and methods so I am thinking that I need to cast the com objects in the array into DraftSighn entities.I have learned how to get all the entities of certain types by using:

dsSketchMgr.GetEntities(dsSelectionFilter, layerNames, entityTypes, entityObjects)

Now I am having a difficult time identifying and casting a object at any particular location of entityObjects.

How is this done?