Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
C# 2.0 Return DataReader object
Message
 
 
À
09/03/2012 18:41:05
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 2.0
Divers
Thread ID:
01537785
Message ID:
01537914
Vues:
27
>An interface says what a class can do, but not how it does it. For example, IDataReader has a Read method that takes no parameters and returns a bool. IDataReader doesn't say how it does the read, but any class that implements IDataReader will have that method. Classes that implement the interface such as SqlDataReader provide the details on how the Read is actually done.
>
>Programming to an interface means that you use the interfaces instead of the classes. Since anything that implements the interface will have the same set of functions and properties, you can do things like substitute the SqlDataReader with an OleDbDataReader with minimal adjustments to your code.

I will read what you wrote here many times and the code the John wrote and I think I will finally get it.
Thank you very much.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform