我想用 c# 编写 VB6 应用程序的这一部分。如何将 long 更改为 Hex 值?
Public Function longToHex(l As Long) As String
longToHex = Hex(l)
If Len(longToHex) < 4 Then longToHex = String(4 - Len(longToHex), "0") & longToHex
longToHex = Right(longToHex, 2) & Left(longToHex, 2)
End Function