Chaos Project

Game Development => Sea of Code => Topic started by: G_G on December 15, 2009, 02:36:57 pm

Title: Loading CS File
Post by: G_G on December 15, 2009, 02:36:57 pm
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?
Title: Re: Loading CS File
Post by: Blizzard on December 15, 2009, 03:42:49 pm
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.