I must clarify that I am looking for a client solution.
Alternatively, is there a C # compiler written in managed code?
On the client
Take a look at dynamic runtime if you are using Silverlight 2.0:
Server or client with full trust
This example uses Microsoft.CSharp.CSharpCodeProvider , compiles on the server and sends the assembly to the client:
There is the equivalent of VB. They allow you to compile a disk or into memory. In most cases, you cannot use them on the client because they need full trust.
Other examples:
Silverlight with full confidence: