By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,569 Members | 1,630 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,569 IT Pros & Developers. It's quick & easy.

Any way to make IndexOf case-insensitive?

P: n/a
SSIA, I don't see a switch or something that might do this but I hope I'm
overlooking it. Any suggestions? Thanks!

--

Matt

"Gravity. It's not just a good idea, it's the law!"
Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
* "MattB" <so********@yahoo.com> scripsit:
SSIA, I don't see a switch or something that might do this but I hope I'm
overlooking it. Any suggestions? Thanks!


Use 'InStr' instead and specify the 'Compare' parameter.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2

P: n/a
"MattB" <so********@yahoo.com> schrieb
SSIA, I don't see a switch or something that might do this but I hope
I'm overlooking it. Any suggestions? Thanks!


Indexof of which class?
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #3

P: n/a
SSIA, I don't see a switch or something that might do this but I hope I'm
overlooking it. Any suggestions? Thanks!


CultureInfo.CurrentCulture.CompareInfo.IndexOf( _
source, value, CompareOptions.IgnoreCase)

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.