A C# app that parses C# code

Clash Royale CLAN TAG#URR8PPPA C# app that parses C# code
A little while back I wrote an app that used Moonsharp to convert Lua script into GDI+ functions which I used to preview some glass cockpit displays I was making in real time. It would refrain from executing the lua code if it detected a compile error and once the error was cleared it would show me the display output in real time so I could see changes made to coordinates and such the instant I made them.
I would like to replace the Moonsharp Lua script parser though with something that will parse raw C# code instead and execute it. It must be able to reference objects that are within the app and use the same libraries that are used by the app.
Is there any library out there that can do this?
Thanks
JB
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.