Loading CS File

Started by G_G, December 15, 2009, 02:36:57 pm

Previous topic - Next topic

G_G

Say we have Code.cs.
Is it possible for Code.cs's code be loaded from a text file?
Example
Code in a txt file
blah some crap blah

Then the Code.cs loads the code from that txt file
load code from txt file blah
code now is blah some crap blah


Is it possible if so how?

Blizzard

It's not done like that. C# doesn't allow dynamic loading of code.

The only thing you can do is define classes in other namespaces and then use "using namespace" so you don't have to type the entire class-namespace path each time.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.