+1  A: 

Looks pretty good to me. But if you are really that concerned about optimisation, then try compiling this and any alternatives you have, and then using ildasm or Reflector to look at the IL generated to see for sure.

David M
+1  A: 

You could also generate a lookup table of every possible value and the shifted result. Then just use the input as an index into the lookup table to get the desired result

StarPacker
+2  A: 

Did you actually try this? It is non-optimal, it generates garbage results. This ought to work better:

    static int RollLeft4Bits(int n) {
        return ((n << 1) & 15) | ((n >> 3) & 1);
    }
Hans Passant
wow, I just retested my code with something else than 12 and 9 for n and your right, my code is wrong
Fredou