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

yearn2012's avatar

yearn2012 since: 14 Mar 2018;

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

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!

PanagiotisCharalampous's avatar

PanagiotisCharalampous since: 13 Jan 2017;

  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

Head of Community Management at cTrader