Possible Duplicate:
C# - count leading zeroes in an Int32
I'm looking for the C# equivalent to this: http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Long.html#numberOfLeadingZeros(long)
From the Java docs:
Returns the number of zero bits preceding the highest-order ("leftmost") one-bit in the two's complement binary representation of the specified long value.
Hopefully it is already implemented somewhere...