I'll try to keep this short, my problem is i'm making some kind of a "game" (maybe more of an engine?) and the whole idea in what i try to make is that i have made everything ready for others to do, in other words you make your own game but i have made some basic things ready to use, maybe a little like minecraft, where you have some basic stuff but can add mods to it easily.

what i'm thinking is to make some class partial, e.g. i have a input system and i wanna have my own stuff there with some basic movement, but i wanna let the "modders" have the ability to add their own inputs by using a partial class and "simply" load every mod into the solution and just extend the input system with the user made partial class.

now here is the problem i honestly have no clue how i can add this class into the solution at runtime and still make it possible for the program to find these classes and use them as if they're partial/extender to my main input class.

so is this possible and how? code simples and sources would be lovely.

or if there is a better way of doing this, how?

or if it isn't possible, is there any other way i can make it work just the same?

Thanks for reading i appreciate you time and help

- Jackie

EDIT:

fast update: it just came to my mind i could also just load an assembly, however i feel this might be much more advance and it would also require the player/"modder"/stuff to compile every thing to a dll or exe which i really just wanna try to avoid since i wanna keep it simple for the modder/player so he can go right ahead in notepad or something.

an other one also go abit advance since this will require to almost make a whole new language which i REALLY wanna avoid, i can go in on a ini file scanner maybe but please no more here

Edit:

Ps. im using mono development for this game so the solution should be multi platform usable if possible.

It is possible that some simpler technique can suite your application goals, but then you would need to explain them properly. You would need some important skill of isolation of functional requirements from the possible technical solutions; that could help you to avoid loosing the ability to choose right solution due to wrong ideas you might be preoccupied with.

i do know how partial works, you ca split classes up in multiple files, but i wanted to know if you from you program could load and use a class that just add user diff. stuff into an already existing file that way... :)

Even if you know that, you might not understand what "load" means. You can load assembly, you can generate and load assembly during run-time, you can create a DynamicMethod during run-time, but not "extend" a type. If you just analyzed documentation and syntax, from one hand, and the documentation on the life cycle of the process, you would see it.
--SA

We are discussing the topics where there is no essential difference between Mono and .NET. Everything I have written about on related topics works on Mono as well. I regularly test many my codes on Mono for Windows and Linux, also worked with Mac OS X.
--SA

Yes, I do. Exactly the same way as in .NET, through Reflection. Both Mono and .NET are SLR implementation, and they both implement the libraries standardized via ECMA:

http://msdn.microsoft.com/en-us/netframework/aa569283.aspx

Reflection lies in the very fundamentals of CLR, so it works on both. I have actually done very advanced development based not only on System.Reflection, but also on System.Reflection.Emit, tested it all on Mono, everything worked for me.