Detect solid and hollow objects in a single Brep

I have a single Brep object which consists of multiple open and closed geometries, I want to check which geometry is closed and which is open.
Is there any way to do the same using Rhino API in C#

First use GetConnectedComponents() to get all sub-breps. Then test each for closedness with the IsSolid property.