System.Linq.Dynamic.Core icon indicating copy to clipboard operation
System.Linq.Dynamic.Core copied to clipboard

How can we do string interpolation using $?

Open tcortega opened this issue 2 years ago • 3 comments

Seems like $ and it are equivalent, and a reserved keyword. How would we do string interpolation without having to use string.Format?

tcortega avatar Aug 11 '23 17:08 tcortega

Can you provide a full example what you are trying to do?

StefH avatar Aug 11 '23 18:08 StefH

Can you provide a full example what you are trying to do?

new ExpressionParser(null, """$"{1+1}"+string.Empty""", null, null).Parse(null);

Has a simple string interpolation but leads to the No 'it' is in scope exception.

tcortega avatar Aug 13 '23 18:08 tcortega

This is not yet possible.

I'll add config setting (https://github.com/zzzprojects/System.Linq.Dynamic.Core/pull/734)

StefH avatar Aug 13 '23 19:08 StefH