Ok im writing a program in C# and im trying to detect overlappin IP pools or overlapping subnet wildcards if you will. Ive used the NOT logic to turn it from a wildcard to a subnet. Now I have to detect whether an IP is overlapping or not.
An example:

192.168.1.1 255.255.0.0

overlaps

192.168.1.1 255.255.255.0

So I want my code to be able to detect this. Does anyone know anything about this.

Any help is appretiated.