It separates the interface from the implementation.
Here is a decent explanation....
http://bytes.com/forum/thread223924.html
-Drew
"Ignacio Machin ( .NET/ C# MVP )" <ig************@gmail.comwrote in
message
news:09**********************************@24g2000h sh.googlegroups.com...
On Apr 17, 6:56 am, Mike P <mike.p...@gmail.comwrote:
In some of the code I am looking at on a sample website, a lot of
methods are returning interfaces such as IDataReader instead of a plain
DataReader. Why would you want to do this?
*** Sent via Developersdexhttp://www.developersdex.com***
Hi,
Because you do not care about the actual type being returned, you do
not care if it's a SqlDataReader or an OracleDataReader, the only
thing you care about is that it implements the IDataReader interface.