I'm not exactly sure how metasploit works when exploiting a target machine, and it has been a while since of played with it, so forgive me.
Instead of using meterpreter as a payload in metasploit, could I write my own .Net based executable that would be dropped on a system after exploitation? Assuming the victim had .Net on their machine of course.