Is it possible to make it so that code I create will need to be renewed or stop working after a certain time? Like say if my company no longer requires my services, then seeing as it's not in my contract or financial recompense, I think the hours I will have spent on this code should rleave it's use at my discretion. However, I wan't to help people out and earn a name for myself, so it's ideal that I can distribute the code but maintain the discretion of its use.
I'll be using C# for all my code.
I expect many of you are in a similar position, so any advice would be much appreciated.
In my opinion it would be much easier to approach your company and discuss what you can do to save time. Working in IT, most agreements do have a clause about unauthorised software, so I would:
1) Talk to the IT department/person
2) If you are loading it onto a computer you don't own, document it (manage the risk if it breaks)
I would also be sure that your employment contract permits working as a separate company/entity as this may pose additional problems
By far, discussing and demonstrating how your skills can be used can allow you to progress in your current employment. Going in your proposed direction could be VERY bad.