Summary

 
Chapter 5 - C# and the Base Classes
bySimon Robinsonet al.
Wrox Press 2002
  

In this chapter, we have examined some of the facilities provided by the .NET base classes. We have seen how to efficiently construct and process strings using the StringBuilder class, and also how to use the regular expressions engine to perform very sophisticated searches against strings. We then moved on and looked at the different collection objects available. The System.Collections and System.Collections.Specialized namespaces contain a huge number of classes that allow you to store different types of collections of objects. In particular, the Hashtable class enables code to store data in the dictionary with very efficient lookup based on any data type.

Custom attributes, used in conjunction with reflection, provide the very powerful ability for code to examine other code, or even to examine itself. This means that execution can depend on which user - defined attributes have been applied to objects in your code. We saw one example of this with the WhatsNewAttributes code sample, which was able to provide automatic reports on the new features that had been added to software. Finally, we examined some of the issues involved when we code up an application that uses multiple threads.

  


Professional C#. 2nd Edition
Performance Consulting: A Practical Guide for HR and Learning Professionals
ISBN: 1576754359
EAN: 2147483647
Year: 2002
Pages: 244

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net