## How to calculate mode in C#?

Here is the sample code to calculate mode in C# for a set of numbers in an array. This method will get you single mode or multi modes.

It is easy to calculate mean in C#, as arithmetic mean is just the average of the collection of numbers. Here is the sample code.

In this article we will see how to calculate median in c# .Net by coding the median algorithm by yourself and by using a 3rd party library.