Hey,
I've seen some programs that detect is SoftIce and other debuggers are present. A more detailed example/explanation can be found
http://www.honeynet.org/papers/bots/botnet-code.html, but in short (specifically for softice) "This method is used by a lot of crypters/compresors it uses INT 41, this interrupt is used by Windows debugging interface to detect if a debugger is present. Only works under Windows." The other methods are variations on this type of technique, doing something that is idiosyncronatic of a specific debugger and seeing if anything happens that would indicate the debuggers involvement.
And in regards to implementing them in your code, you will need to work with assembler,so first you'll have to convert your IL to real machine code, which locks it down to a specific architecture and all the rest that goes with abandoning the .Net platform. It is probably possible to work with ASM in unsafe code within C# (C can do it), but not in a way that will be effective as an anti-crack method.
Of course, as dawmail333 has stated (and it is my opinion as well), anti-piracy implementations to date have done nothing to stop crackers (it only delays them mildly) but annoy rightful owners and cause people that have bought legitimate copies problems. This is probably even evident to you based on your own experience, you couldn't open your IDE (which you obtained legitimately) while a dissassembler (that you were using completely legitimately) was running.
If you do insist on invasive copy protection though, the link in the first paragraph should be helpful.
If you are just looking at it from an academic point of view I highly recommend checking it out.