.Net 2.0
Previously using C++, we could use #include <filename> and the contents of that file would be dropped where the #include was specified. I am looking for something similar.
Example:
So the output should be:Code:public void A() { string output = string.Empty; for (int i = 0; i < 5; ++i) { #include <somefile> output += i; output += "\n"; } MessageBox.Show(output); } somefile's contents: i++;
1
3
5
I can do it using reflection and partial classes but I really dont want to do it this way. Its long and clumsy.
Thanks in advance.




Reply With Quote