To find the standard deviation of all keys in a map, you can use LINQ to first get an array of all the keys, then use the StandardDeviation
method from the System.Linq
namespace. Here's an example:
main.cs1007 chars38 lines
In this example, the keys
array is calculated using map.Keys.ToArray()
. The StandardDeviation
method is then called on the keys
array using the extension method defined at the bottom of the code snippet. The resulting standard deviation is printed to the console.
gistlibby LogSnag