title: Given an IP address and subnetmask, how do I calculate the CIDR?
body: <p>Ok I can't seem to figure this out: given the following:</p>
  
  <p><code>IP address = 192.168.1.0</code><br>
  <code>Subnetmask = 255.255.255.240</code></p>
  
  <p>Using c#, how do I calculate the CIDR notation <code>192.168.1.0/28</code> ? Is there an easy way to achieve this? Am I missing something? </p>
  
  <p>Thanks!</p>