如果我有一个包含ac#string文字表达式的字符串,我可以在运行时"展开"它
public void TestEvaluateString()
{
string Dummy = EvalString( @"Contains \r\n new line");
Debug.Assert(Dummy == "Contains \r\n new line");
}
private string EvalString(string input)
{
return "Contains \r\n new line";
}
Run Code Online (Sandbox Code Playgroud)
就像我可以将C#字符串值转换为转义字符串文字,但反过来?
c# ×1