C# FormatException : Format specifier was invalid in .Net6.0

Created at 21 Jun 2022, 14:51
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!
Bits's avatar

Bits

Joined 14.03.2018

C# FormatException : Format specifier was invalid in .Net6.0
21 Jun 2022, 14:51


eg:

var a=5;

var b=2;

code $"{a-b:C}"  in console app ,it's is output  "$2.00" correctly, but it throw a FormatException : "Format specifier was invalid" in  algo  file!


@Bits
Replies

PanagiotisCharalampous
23 Jun 2022, 15:53

Hi yearn,

Please provide us with the complete cBot code so that we can check,

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous