Editor support for C# string interpolation
Created at 19 Mar 2021, 17:03
MU
Editor support for C# string interpolation
19 Mar 2021, 17:03
Introduced in C# 6, string interpolation is a handy for formatting strings without using String.Format.
For example, after adding the following lines in Visual Studio and building the cBot, the text is output correctly to the log.
string name = "MuttleyBerks";
Print($"My profile name is {name}.");
As soon as the cTrader editor displays the source, "$" is removed.
https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated
cTrader Automate
@MuttleyBerks
Replies
dcommandeur83
05 Sep 2021, 16:08
Editor support for C# string interpolation
Any update on this yet? would be nice but i know how time consuming this stuff can be.
@dcommandeur83
amusleh
19 Mar 2021, 17:52
Hi,
The current version of cTrader automate uses C# 4.0 for compiling your code, and it doesn't support string interpolation, all new features of C# and .NET will be supported on cTrader automate after migration to .NET core, right now that's the main priority.
@amusleh