Case Sensitivity You need to get the collection to ignore case sensitivity on the key. In this
Question:
Case Sensitivity
You need to get the collection to ignore case sensitivity on the key. In this Try It Out, you do this by ensuring that whenever you save a key, you transform the email address into all lowercase characters. Whenever you perform a lookup based on a key, you transform whatever you search for into lowercase characters, too. All the code for this Try It Out is in the code folder Structure Demo in the Zip file for this chapter.
1. Return to Visual Studio 2015, open the Code Editor for the CustomerCollection class and make the bolded change to the Add method:
2. Find the overloaded Item property that takes an email address and modify the code as shown here:
3. Find the Remove method and modify the code as shown here:
4. Run the project and click the List Customer button. Now if you enter a valid email address in all uppercase characters, the lookup will still work.