how to get the surface type?(ISurface)

In my program,I need to get the surface type and get the count of each type,but how?  if you have some interesting in my question,please answer me and I will be very happp

SolidworksApi macros