I am trying to run the sample app. It worked once and after that one time I keep getting the error in the title in the following code line in MainWindow.xaml.cs
EmotionScores = emotions.Select(e => e.Scores).ToArray()
What can I do ? Thanks
I am trying to run the sample app. It worked once and after that one time I keep getting the error in the title in the following code line in MainWindow.xaml.cs
EmotionScores = emotions.Select(e => e.Scores).ToArray()
What can I do ? Thanks
The error message you get is pretty self-explanatory. You try to assign a reference to an array of Scores
to a variable that can holds a reference to an array of EmotionScores
. This cannot be done, because as it seems there isn't any implicit conversion between these types.
If just want to get and save somewhere the scores, you could just store them in another variable:
var scores = emotions.Select(e => e.Scores).ToArray();