官术网_书友最值得收藏!

Practicing and exploring

Test your knowledge and understanding by answering some questions, get some hands-on practice, and explore with deeper research into topics of this chapter.

Exercise 4.1 – test your knowledge

Use the Web to answer the following questions:

  1. Does every assembly you create have a reference to the mscorlib.dll assembly?
  2. What is the maximum number of characters that can be stored in a string?
  3. When and why should you use a SecureString?
  4. When should you use a LinkedList?
  5. When should you use a SortedDictionary class rather than a SortedList class?
  6. Why should you not use the official standard for e-mail addresses to create a regular expression for validating a user's e-mail address?

Exercise 4.2 – practice regular expressions

Create a console application named Ch04_Exercise02 that prompts the user to enter a regular expression, and then prompts the user to enter some input and compare the two for a match until the user presses Esc:

The default regular expression checks for at least one digit.
Enter a regular expression (or press ENTER to use the default): ^[a-z]+$
Enter some input: apples
apples matches ^[a-z]+$? True
Press ESC to end or any key to try again.
Enter a regular expression (or press ENTER to use the default): ^[a-z]+$
Enter some input: abc123xyz
abc123xyz matches ^[a-z]+$? False
Press ESC to end or any key to try again.

Exercise 4.3 – explore topics

Use the following links to read in more detail the topics covered in this chapter:

主站蜘蛛池模板: 孟州市| 新宁县| 吉木萨尔县| 遂宁市| 盈江县| 巨鹿县| 大化| 潼关县| 武乡县| 贡觉县| 罗平县| 融水| 密云县| 临沂市| 岳池县| 新津县| 长宁县| 磐石市| 东海县| 昌都县| 东海县| 长春市| 曲沃县| 额济纳旗| 万载县| 岐山县| 阿克苏市| 滦平县| 灌南县| 鄂托克前旗| 清水县| 隆子县| 股票| 汉中市| 武清区| 永和县| 长子县| 甘谷县| 商河县| 房山区| 东城区|