Click here to Skip to main content
15,891,529 members
Articles / Programming Languages / Visual Basic

Compiling .NET code on-the-fly

Rate me:
Please Sign up or sign in to vote.
4.93/5 (57 votes)
19 Nov 20034 min read 326.3K   2.7K   115  
Compile .NET code programmatically, in memory, then use the resulting assembly to instantiate an object of a class, access its properties and methods, and call a static function.

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

No alternatives have been posted.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United States United States
Jim is a developer working in Auburn, Alabama, USA. He started working as a programmer in 1997; much of his early experience was with MFC and ASP, with brief forays into Java servlets, Borland's OWL, and plain-old windows API.

Since 2001 Jim has worked primarily with .NET, writing windows and web applications, windows services, and client-server apps. With a little bit of AS3/Flex code thrown in there.

Jim comments code in the first person (much to the amusement of his coworkers,) and feels especially weird writing about himself in the third.

Comments and Discussions