Xamarin Studio version 5.10.3 build 51
For example if I wrote this code:
var text = $"Some string with {order}";
text = text.ToLower();
Xamarin studio seems not able to determine what the data type of "text" is.
"order" also is an object and I can't access its properties. I changed the C# version of my project and it didn't fix anything.
If you know a solution to this problem please tell me.
答案 0 :(得分:2)
As per Xamarin forums, string interpolation works in Xamarin 6.0, Check the link below: https://forums.xamarin.com/discussion/55995/xamarin-studio-not-recognize-string-interpolation
答案 1 :(得分:2)
You need to ensure you're running on Xamarin Studio 6.0+. You can currently find this on the Alpha channel of the updater. I believe other versions have partial support for C# 6.
https://developer.xamarin.com/recipes/cross-platform/ide/change_updates_channel/