Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

My program has a search and update function. But it will only find a match if the user types in Jane Doe not jane doe. ATM my programs retrieving user input, converting into char array and changing the first letter of each word but this doesn't seem to work either. This is the code I'm using..

Any help on how to go about this would be great and why my method of conversion isn't working :)

share|improve this question

closed as off topic by avirk, Indrek, Daniel Beck Oct 7 '12 at 10:31

Questions on Super User are expected to relate to computer software or computer hardware within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Not migrating to a more appropriate site as this question seems to be too basic. –  Daniel Beck Oct 7 '12 at 10:32

1 Answer 1

up vote 0 down vote accepted

In C#, strings have a number of comparison functions, such as the Equals function, that have case insensitive overloads.

Another possibility you might look into, if the array you're searching in is sorted, is the Array.BinarySearch<string> function.

share|improve this answer
    
Thanks, I'll look into that. –  Jane Oct 7 '12 at 6:06
    
Are you able to explain why my method of comparison isn't working? –  Jane Oct 7 '12 at 7:49
    
You didn't specify your method of comparison. Can you post the code? And the real code this time? –  Mr Lister Oct 7 '12 at 8:33
    
Edited my post to include my if compare method –  Jane Oct 7 '12 at 8:37
    
The inserting into array code segment is in a different method etc –  Jane Oct 7 '12 at 8:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.