Skip to content

Runtime Code Compiler

Dan

Asked Jul 25, 2008, 2:50 PM EDT2 answers
Share
LinkedInX
Right now I have an application which is sort of like Excel, but is more powerful in the fact that I can run C# code within each cell. A cell has a formula, which is any expression, and a function, which is the C# code. I can do any type of loop or logical statement in the function on a variable(s) and reference those in the formula.

Example:

Function
-----------------
Code
int value = 0;
for( int x = 0; x < 10; x++ )
{
    value ++ x;
}
Formula = value * 10
Result = 90


Right now I am doing this through CodeDom, which is a little slower than I would like. Is there another alternative I could do which is much faster but still gives me the power of being able to do what I can here?

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • Bechir Bejaoui
    +1
    Of corse use SAX instead of dom as the last one read partially an inmemory  xml  representation  I  mean  at  the  constarst of dom that needs to have the entire xml memory in order to perform a task the SAX do this bloc by bloc so it is the perfect solution for your project 
    +1
  • +1
    Alright I'll look into that. Thanks alot!
    +1