all what i need to know is how to store a code like the below into string variable
if (status == "admin")
{
Messegebox.Show("Hello");
}
Note that: I have tried @ and \ but the result is still some redlines .
all what i need to know is how to store a code like the below into string variable
if (status == "admin")
{
Messegebox.Show("Hello");
}
Note that: I have tried @ and \ but the result is still some redlines .
Use '\' to escape double quotes within the string and '\n' to reflect new lines:
{String myCode = "if (status == \"admin\")\n{\n Messegebox.Show(\"Hello\");\n}";}