Editor support for C# string interpolation

Created at 19 Mar 2021, 17:03
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
MU

MuttleyBerks

Joined 19.03.2021

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

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

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