In This Appendix
Table A-1 provides a shortcut to reference the types and classes described in this book that are supported only in .NET 2.0 and C# 2.0.
Table A-1. .NET 2.0 and C# 2.0 Features Index
Chapter.Section | Feature | Description |
---|---|---|
| Now referred to as a | |
| Has been added to return a Boolean value if a string can be successfully converted into the target type: int iParse = Int32.TryParse("100", out result); | |
Static class | A class containing only static members can be declared. | |
Property access modifier | The get and set accessors can now have modifiers:
| |
Anonymous methods | Eliminates the need for a separate event handler for delegates. | |
Generics syntax | New syntax that enables collection objects to be made type-safe. An application specifies the type of data a class can hold in a parameter: myStack<T> = new myStack<T>(); | |
Iterators | An easier way to implement enumeration on a custom class. | |
| Holds a generic version of the collection classes. New classes include | |
| Some new WinForms controls. | |
|
| |
| New class used to define the behavior of the | |
| New method that returns an instance of an | |
| Used to return connection and command objects from a specified data provider: string pvdr="System.Data.SqlClient"; DBProviderFactory factory; factory = DBProviderFactories.GetFactory(pvdr); DbConnection conn = factory.CreateConnection(); | |
| Accepts a | |
| WinForms class that supersedes the | |
| Class to perform text compression. | |
| Permits data to be passed to a thread. | |
| A new synchronization class that is used to control the number of threads that can access a resource. | |
Partial classes | A code-behind page can now contain a partial class that extends the class in the main Web page. | |
| Permits a Web page to easily post its content to a Web page other than itself. | |
| ASP.NET's new control that supersedes the | |
| Indicates whether data bound to a list control should overwrite existing data in the control. | |
| The logic for accessing a data source can now be encapsulated in controls designed to serve as a bridge to a variety of data sources including SQL and XML. | |
| Allows validation controls to be grouped so that when a page is submitted, only controls whose validators are in a specific group are validated. | |
Master pages | Allow a Web page to be created as a template that provides a consistent interface to users. New content pages are created by replacing the placeholders in the template. | |
| New section in the | |
Web Service response handled as event | .NET now includes in a Web proxy a delegate and event that fire when a Web Service returns a response. An application can process the results in its custom event handler. |