
'需要点击菜单:工程->引用->MicrosoftScriptingRuntime Public Function HasRepeat(ByRef arr() As String) As Boolean Dim dict As Dictionary Set dict = New Dictionary Dim i As Variant For Each i In arr If i <> "" Then If dict.Exists(i) Then HasRepeat = True Exit Function Else dict.Add i,0 End If End If Next HasRepeat = FalseEnd Function总结
以上是内存溢出为你收集整理的VB检测数组中的重复元素全部内容,希望文章能够帮你解决VB检测数组中的重复元素所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)