Closed Gicminos closed 8 years ago
$"" string formatting is a component of c#6. Please update to VS2015.
Please search and use the subreddit if you can, as this is an issue tracker for bugs only. On 16 Jul 2016 01:20, "Mikael Giacomini" notifications@github.com wrote:
When I try to compile the code with Visual Studio 2013, it gets an error for the '$' character in this line of code of https://github.com/Jessecar96/SteamBot/blob/master/SteamBot/TradeOfferUserHandler.cs http://url :
switch (offer.OfferState) { case TradeOfferState.TradeOfferStateAccepted: Log.Info($"Trade offer {offer.TradeOfferId} has been completed!"); SendChatMessage("Trade completed, thank you!"); break; case TradeOfferState.TradeOfferStateActive: case TradeOfferState.TradeOfferStateNeedsConfirmation: case TradeOfferState.TradeOfferStateInEscrow: //Trade is still active but incomplete break; case TradeOfferState.TradeOfferStateCountered: Log.Info($"Trade offer {offer.TradeOfferId} was countered"); break; default: Log.Info($"Trade offer {offer.TradeOfferId} failed"); break; }
I tried to remove all '$' and Visual Studio compiled it fine and the program works, but in log I founded that:
INFO: Trade offer {offer.TradeOfferId} has been completed!
Why Visual Studio 2013 doesn't recognise this character? I followed the wiki, what's the problem?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Jessecar96/SteamBot/issues/1036, or mute the thread https://github.com/notifications/unsubscribe-auth/AGlmRE--Ngg2KVhG9mxrfhPH0Wu7OFe_ks5qWCPAgaJpZM4JN4HF .
When I try to compile the code with Visual Studio 2013, it gets an error for the '$' character in this line of code of https://github.com/Jessecar96/SteamBot/blob/master/SteamBot/TradeOfferUserHandler.cs :
switch (offer.OfferState) { case TradeOfferState.TradeOfferStateAccepted: Log.Info($"Trade offer {offer.TradeOfferId} has been completed!"); SendChatMessage("Trade completed, thank you!"); break; case TradeOfferState.TradeOfferStateActive: case TradeOfferState.TradeOfferStateNeedsConfirmation: case TradeOfferState.TradeOfferStateInEscrow: //Trade is still active but incomplete break; case TradeOfferState.TradeOfferStateCountered: Log.Info($"Trade offer {offer.TradeOfferId} was countered"); break; default: Log.Info($"Trade offer {offer.TradeOfferId} failed"); break; }
I tried to remove all '$' and Visual Studio compiled it fine and the program works, but in log I founded that:
INFO: Trade offer {offer.TradeOfferId} has been completed!
Why Visual Studio 2013 doesn't recognise this character? I followed the wiki, what's the problem?