Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27472

VS 2010 Dictionary case sensitive

$
0
0
Hopefully this will be the last question that I have on this project......

I have a dictionary with data similar to "Jim|whatever" and am trying to do a search.

I can use
Code:

Private Sub btnSearch_Click(sender As System.Object, e As System.EventArgs) Handles btnSearch.Click
        strFind = txtSearch.Text

        If dict.ContainsKey(strFind) Then
            MessageBox.Show("Found Key")
        Else
            MessageBox.Show("Key not Found")
        End If
    End Sub

And all of that works correctly.

However, I need this to be case insensitive. Right now if I search for "Jim" it says found key, but if I search for "jim" it doesn't.

So, how can I make this into an insensitive search?

Thanks in advance!
Jim

Viewing all articles
Browse latest Browse all 27472

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>