Mathematica 9 is now available

Wolfram Library Archive


All Collections Articles Books Conference Proceedings
Courseware Demos MathSource Technical Notes
Title Downloads

Mixed Language Compilation of C# Code
Author

Frank Kampas
Organization: Physicist at Large Consulting
Revision date

2008-06-07
Description

In-memory compilation of C# can be accomplished through .NETLink using the compiler built into the .NET runtime. This is more convenient for developing and testing C# code than using Microsoft Visual Studio and then calling the resulting assembly from .NETLink. In that situation it is necessary to release the assembly from .NETLink before it can be recompiled in Visual Studio. This is not necessary for the technique discussed here. If there are compilation errors, the code described here reproduces the code lines containing errors with the error position marked. Also, compiling C# code in memory can provide faster numerical calculations than can be obtained using the internal compiler.
Subjects

*Applied Mathematics > Numerical Methods
*Mathematica Technology > Linking Technology > .NET/Link
Keywords

C#, Mixed Language, Numerical Calculations
Downloads Download Wolfram CDF Player

Download
mixed_lang_c#.nb (45 KB) - Mathematica Notebook