Appendix A. Features Specific to .NET 2.0 and C 2.0

 < Day Day Up > 

Appendix A. Features Specific to .NET 2.0 and C# 2.0

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





float type

Now referred to as a single.


tryParse method

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:

protected set { name= value; }


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>();



An easier way to implement enumeration on a custom class.


System.Collection. Generic namespace

Holds a generic version of the collection classes. New classes include List<>, Dictionary<>, and Stack<>.


DataGridView and MenuStrip controls

Some new WinForms controls.


StatusStrip and ToolStripProgressBar controls

StatusStrip control supersedes StatusBar. ToolStripProgressBar can be displayed on a StatusStrip.


XmlReaderSettings class

New class used to define the behavior of the XmlReader object. Notably, it allows XML validation to be performed automatically while reading nodes.


XmlReader.Create method

New method that returns an instance of an XmlReader.


ProviderFactory class

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(); 


DataTable.Load() method

Accepts a DataReader object as a parameter and fills a table based on DataReader.


DataGridView class

WinForms class that supersedes the DataGrid control. Includes a virtual mode that permits the application to dynamically control the contents of the grid


GZipStream class

Class to perform text compression.


ParameterizedThreadStart delegate

Permits data to be passed to a thread.


Semaphore class

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.


PostBackUrl property

Permits a Web page to easily post its content to a Web page other than itself.


GridView control

ASP.NET's new control that supersedes the DataGrid control.


AppendDataBoundItems property

Indicates whether data bound to a list control should overwrite existing data in the control.


DataSource controls

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.


ValidationGroup property

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.


<connectionStrings> section

New section in the web.config file reserved for connection strings.


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.

     < Day Day Up > 

    Core C# and  .NET
    Core C# and .NET
    ISBN: 131472275
    EAN: N/A
    Year: 2005
    Pages: 219 © 2008-2017.
    If you may any questions please contact us: