IEnumerable is an interface that defines one method GetEnumerator which returns an IEnumerator interface, this allows readonly access to a collection then collection that implements IEnumerable can be used with a for-each statement.
So it is list of elements, I am not sure how one float value will convert into IEnumerable.
+1
Amit GuptaRank #190 · 12.8K reputationPosted Apr 27, 2017, 2:32 AM EDT
+1
Hey
As per enclosed image, you are adding a single float value that accepts a collection in its parameter. As you are fetching average that returns single value.
I suggest to convert first IEnumrable to generic list and then use this list to create a new Collection using the parametrized constructor of Collection class.
Eg:
public static Collection test
test = new Collection
(
test
.Distinct(new API.MediaInfoComparer())
.ToList()
);
Try this and let us know if it helps u, Thank you.
Manas MohapatraRank #182 · 13.2K reputationPosted Apr 27, 2017, 1:48 AM EDT
Amit GuptaRank #190 · 12.8K reputationPosted Apr 27, 2017, 2:32 AM EDT
arvind baldaniyaRank #3,964 · 375 reputationPosted Apr 27, 2017, 2:36 AM EDT
Rathrola Prem KumarRank #307 · 8.2K reputationPosted Apr 27, 2017, 5:24 PM EDT
IEnumrableto generic list and then use this list to create a newCollectionusing the parametrized constructor ofCollectionclass.Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts