Runtime Polymorphism
ASP.NET
1
Posts
1
Posters
0
Views
1
Watching
-
Hai all, we all know the concept "overriding" is the example of runtime polymorphism. now in .net 2.0, Look at this..
DataSet ds = new DataSet(); DataTableReader DSdr = ds.CreateDataReader(); DSdr.NextResult(); DataTableReader DTdr = ds.Tables[0].CreateDataReader(); DTdr.NextResult();
here DSdr and DTdr has the method Next Result(); the reference given by dataset will work for NextResult and the reference given by datatable will return nothing. both the methods returns the datatablereader object reference and the the reference returned by dataset will only work for Next Result. I think this can be a example of Runtime Polymorphism Cheers asithangae