I am stuck with this line of the code.. with the following error message
"type of conditional expression cannot be determined because there is no implicit conversion between int and string"
on this c.TrackID
and c.Times
bit line of the code.
I tried using this (object)
solution from here and this one too but none of theme worked.
What am I doing wrong here? Here's the code for your inspection:
Func<TopPlayed, string> orderingFunction = (c => sortColumnIndex == 1 && is_trackID_Sortable ? c.TrackID :
sortColumnIndex == 2 && is_trackName_Sortable ? c.TrackName :
sortColumnIndex == 3 && is_artistName_Sortable ? c.ArtistName :
sortColumnIndex == 4 && is_times_Sortable ? c.Times : "");