Dim sd As New SortedDictionary(Of Double, String)
Dim ll As WinForm.TextBox = e.Form.Controls("TextBox17")
Dim aa As WinForm.TextBox = e.Form.Controls("TextBox18")
Dim bb As WinForm.TextBox = e.Form.Controls("TextBox19")
For Each dr As Row In Tables("配方颜色表")
Dim key As Double = math.sqrt((ll.value - dr("L值"))^2 + (aa.value - dr("A值"))^2 +(bb.value - dr("B值"))^2)
If sd.ContainsKey(key) = False Then
sd.Add(key,dr)
End If
Next
Dim min As Double = sd.keys(0)
Dim minRow As Row = sd(sd.keys(0))