By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,581 Members | 1,966 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,581 IT Pros & Developers. It's quick & easy.

How to compile c# code dynamically?

P: n/a
Hi Frends,

I have a "a.aspx.cs" and "b.aspx.cs", can i compile b.aspx.cs from a.aspx.cs?

Thanks in advance

Best Regards,
Senthil kumar Ramachandran

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>bJOOPwmxPkqACl03wxL7Tg==</Id>
Nov 16 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Take a look at:
http://www.codeproject.com/dotnet/CodeFromCode.asp

It's in VB.NET, but you should be able to translate it pretty easily.

In particular, look at the ProcessExpression method, the part commented as
"Compiling the source file to an assembly DLL (IL code)."

Then the very next section shows how to call something from the compiled
code.

--
Adam Clauss
ca*****@tamu.edu

"Senthil Kumar via .NET 247" <an*******@dotnet247.com> wrote in message
news:uV**************@tk2msftngp13.phx.gbl...
Hi Frends,

I have a "a.aspx.cs" and "b.aspx.cs", can i compile b.aspx.cs from
a.aspx.cs?

Thanks in advance

Best Regards,
Senthil kumar Ramachandran

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>bJOOPwmxPkqACl03wxL7Tg==</Id>

Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.