.NET Framework

.NET Framework Articles

OOPS With CSharp

Some scenarios I came across while working with C# where OOPs funda deviated at some level to provide more flexibility. Suggest me some more scenarios if I miss anyone.

Scenario # 1.
Two interface having same method signature is derived by a class.

How to implement methods in a class with same signature from different interfaces?
We can use named identifiers to identify the common method we implemented based on two different interfaces.

i.e. If …

MVC Vs MVP

While surfing for the differences between MVC (Model View Controller) and MVP (Model View Presenter) I found lots of confusion over the net. Also I found some differences between the two on some sites, but none of them have complete list of differences. Following is one attempt for compiling almost all the differences between the two patterns.

Parameter

MVC (Model View Controller)

MVP (Model View Presenter)

Structure

View(UI), Model(Business Entities/Data), Controller(UI Business Logic/Request Handling)

View(UI), …

IQueryable Vs IEnumerable

IQueryable inherited IEnumerable, so it obviously get all the functionality IEnumerable has. The working style of both is still different. There are still lot many differences exists between the two which impact the decision we took in usage of either one. Both of these suits for particular scenarios. Following are some differences using which we can took decision to use anyone of these optimally.

Parameter

IQueryable

IEnumerable

Extension Methods

Extension methods defined for IQueryable …