📄 customcomparer.vb
字号:
Class CustomComparer : Implements IComparer
Public Function CompareTo(ByVal o1 As Object, _
ByVal o2 As Object) As Integer _
Implements IComparer.Compare
Dim num1, num2 As Integer
Try
num1 = CType(o1, Integer)
num2 = CType(o2, Integer)
Catch compareException As system.Exception
Throw (compareException)
Exit Function
End Try
If Math.Cos(num1) < Math.Cos(num2) Then
Return -1
Else
If Math.Cos(num1) > Math.Cos(num2) Then
Return 1
Else
Return 0
End If
End If
End Function
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -