I'm working on exam in which when the student asked to something like (declare if statement) he will answer in Rich text box.
the question is: I want to search for the input of the student in that box, and therefore, I must declare a string that contains the code (as string) something like that:
string check = " string stat = "new";
if (stat == "new")
{
Console.WriteLine(stat);
}
";
However, the problem is that, the escape characters and the other preserved voids such as (if).
Briefly: I want to create string that contains a code.
NOTE: I have tried the @ and putting before escape characters, but it didn't work.
Thanks
See Question&Answers more detail:os