In a uwp function, I am calling this:
var selectedDates = sender.SelectedDates.Select(p => p.Date.Month.ToString() + "/" + p.Date.Day.ToString()).ToArray();
var values = string.Join(", " + (string[])selectedDates);
CalendarViewResultTextBlock.Text = values;
But I got an error when compiling them:
Error CS0121 The call is ambiguous between the following methods or properties: 'string.Join(string, params object[])' and 'string.Join(string, params string[])'
Who knows how to fix it? Thanks.
Try the following:
var values = string.Join(", ", (string[]) selectedDates );
(Remove the + sign)
You have a wrong call. It should be
string.Join(", ", array)
In your example it's + but should be **, **.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With