As David Rutten explained you will need different methods/functions implemented as c# component for different geometries with all specific features that different geometry type has.
Here is example of C# component for curves : RemoveDuplicateCurves.gh (246.3 KB)
It uses code from previous post where are some explanations considering used algorithm:
It removes all duplicate curves, but it can be easily modified to keep one and remove the rest of duplicates.
R