What code do you want to reuse?
If it is FOSS, then check the documentation. The binaries are probably fair game. Even if the originator wants you to recompile or if you want to recompile, you should just have to make sure that you follow the license details.
If it is MS .net stuff, well even MS deserves the consideration of being able to track where their code is used.
If it is MSDN stuff, then you really need to make sure that MS is fine with you using it.
If it is something else, then follow the general advice for FOSS above.
I know, you should already know that. Even so...