Use the following feature:

`double.PositiveInfinity`

as a starting value, if you want to find minimum, and

`double.NegativeInfinity`

, if you want to find maximum:

http://msdn.microsoft.com/en-us/library/system.double.positiveinfinity.aspx[

^],

http://msdn.microsoft.com/en-us/library/system.double.negativeinfinity.aspx[

^].

Cycle through all possible pairs of point and find the distance between them, compare with current minimum and decrease the current minimum if the distance is smaller. The opposite with maximum. When iterations are done, your current minimum will be the answer. Same thing with maximum.

—SA