Class DimEqualityComparer Inherits EqualityComparer(Of Dimension) Public Overrides Function Equals(ByVal d1 As Dimension, ByVal d2 As Dimension) As Boolean If d1 Is Nothing AndAlso d2 Is Nothing Then Return True ElseIf d1 Is Nothing OrElse d2 Is Nothing Then Return False ElseIf d1.DimensionText = d2.DimensionText Then Return True Else Return False End If End Function Public Overrides Function GetHashCode(ByVal d As Dimension) As Integer Return d.DimensionText.GetHashCode() End Function End Class Public Class ss_Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click BiaoZhus = BiaoZhus.Distinct(New DimEqualityComparer) End Sub End Class