I have a string expresion Like ( This will be a string)
"Func<int, string> myfunc = (var1 => (var1 == 0 ? 'ok' : var1 == 1 ? 'Running' : 'Fals'));"
I want to convert this expresiion to a valid lambda exression Like
Func<int, string> myfunc = (var1 => (var1 == 0 ? "ok" : var1 == 1 ? "Running" : "Fals"));
How i can parse my string expression to lambda
Update
I think i want just remove 1st and last "" (double quotes) in c# code via .
and i think the string.Romove()
is good(Any other way will appreciate) .but I don't know how can remove that ? Any one help me
New Updated:
my actual work is convert c# language code to vb.net language code to etc. The user put a code like string format .So i want to change string to c# code.