You can't, in practice. You can use obfuscators to make it harder to understand, but you cannot fully prevent "decoding" of your application code in C# or any other language. If it can be executed, then it contains all the information needed to "decode" it - or it can't run in the first place. All you can do is make the code harder to understand and harder to reuse.
Have a look here:
Google obfuscators[
^] - there are some comparisons in there.