I was making a debug menu, and I was wondering if there was a way to take user input and run that as a line of code while the application is running.
here's some code to help you understand what I mean:
using System;
using System.Threading;
namespace ExampleCode
{
class Program
{
public static void debugMenu()
{
string codeToRun = Console.ReadLine();
//execute codeToRun as a line of code
}
}
}
so if the input was "debugMenu();" then it would rerun the method.
it would help a lot with debugging, because I could reach and test, any method while the application is still running.
Thank you for the answers!