You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 13, 2018. It is now read-only.
Jordan Kniest edited this page Jun 17, 2017
·
3 revisions
These methods are only available for numeric collections:
int
double
float
long
Avg
Return the average value
Structure:
publicTYPEAvg();
Example:
// Create a new collection with three integersvarcollection=newCollection<int>(10,20,30);// Calculate the average valuevarresult=collection.Avg();// Print the result to the consoleConsole.Write(result);// The result is: 30
Median
Return the median value
Structure:
// Create a new collection with three integersvarcollection=newCollection<int>(10,20,30);// Calculate the median valuevarresult=collection.Median();// Print the result to the consoleConsole.Write(result);// The result is: 20