editor.TraceBoundary in .Net

HI, I have develop an apply and I need to use the TraceBoundary function.
In Autocad it give a Polyline but in Bricscad i got a Region.

I have an error by the Explode Function (System Violation Access)

Have you got any example how to use traceBoundary with Bricscad ?