A.4. Interfaces

Table of contents:

A 4 Interfaces

C# uses the interface statement along with opening and closing braces to indicate the beginning and end of an interface definition. For example:

public interface IDataAdapter {
 // Member definitions
}

In VB, an interface definition is indicated by the Interface ... End Interface construct:

Public Interface IDataAdapter
  member definitions
End Interface

C# uses the colon with interfaces to specify any implemented interfaces. For example:

public interface IDataReader : IDisposable, IDataRecord

In VB, any implemented interfaces are specified by an Implements statement on the line immediately following the Interface statement. The previous definition of IDataReader in C# would appear as follows in VB:

Public Interface IDataReader
 Implements IDisposable, IDataRecord

Connecting to Data

Retrieving and Managing Data

Searching and Analyzing Data

Adding and Modifying Data

Copying and Transferring Data

Maintaining Database Integrity

Binding Data to .NET User Interfaces

Working with XML

Optimizing .NET Data Access

Enumerating and Maintaining Database Objects

Appendix A. Converting from C# to VB Syntax



ADO. NET Cookbook
ADO.NET 3.5 Cookbook (Cookbooks (OReilly))
ISBN: 0596101406
EAN: 2147483647
Year: 2002
Pages: 222
Authors: Bill Hamilton

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