How to get the intersection of the segment using C#?

Hi,

Does anyone knows how to get the intersection of the segment in C#? as shown below. Any suggestion or ideas would be appreciated Thanks in advance

Thanks,

Jhon

SolidworksApi macros