将字符串与组合框中的项目进行比较时区分大小写?虚拟网

问题描述

我无法让它工作。它比较字符串是否包含组合框项目中的单词,但它区分大小写,我不希望它如此。我已经尝试过 StringComparer.InvariantCultureIgnoreCase 但它根本不起作用找不到匹配项。我需要帮助:(

 Dim lokacija_brand = Application.StartupPath.ToString + "\dlls\vehbrands.cpl"
            For i As Integer = 0 To new_project.ComboBox4.Items.Count - 1
                If new_project.Label17.Text.ToString.Contains(new_project.ComboBox4.Items(i)) Then
                    Dim result = i
                    Dim selT As Integer
                    selT = Convert.ToInt64(result)
                    new_project.ComboBox4.Selectedindex = result
                    new_project.ComboBox4.DroppedDown = False
                    Exit For
                End If
            Next
        Catch ex As Exception
        End Try

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)