Click here to Skip to main content
14,979,294 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Is there any way to execute code from textbox using Roslyn or other method?
If yes, can you give some tips or samples?

I'm kinda new to coding so an example would be great to be honest.

Basically I want to execute a piece of code using textbox on the form.

Thanks in advance!

What I have tried:

Nothing at the moment since I don't know where to start...
Updated 11-Mar-21 5:13am
Garth J Lancaster 8-Apr-20 21:27pm
"Basically I want to execute a piece of code using textbox on the form" .. the question in my mind is 'how complex' is this code you want to execute ? I did a quick Google (since it's something I've often thought about) using "c# roslyn scripting from string" and received a number of hits, appearing useful

1 solution

How about using the microsoft script control? Like this:

Adding VBScript and JScript support in your C++ applications[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900