It's worth noting that Mono's C# compiler already has an API (and a REPL shell built on top of it) for several years.

You can read more about it here: http://www.mono-project.com/CsharpRepl