VBA代码转C# 求高手转义并测试
Private Sub CommandButton1_Click()
Dim d, arr, s$, i
arr = Range("a1", [b65536].End(3))
Set d = CreateObject("Scripting.Dictionary")
For i = 1 To UBound(arr)
s = arr(i, 1) & arr(i, 2)
If Not d.exists(s)
Then d(s) = i Else Cells(i, 2).Interior.ColorIndex = 22 End If Next Set d = Nothing End Sub
补充:.NET技术 , C#