Browse by Tags

All Tags » Design/Coding Guidance » DevCenterPost » OOD (RSS)

Using the dynamic Keyword in C# to Improve Object-Orientation

With polymorphism, object-oriented languages allow "...different data types to be handled using a uniform interface". Ad-hoc polymorphism is when you declare multiple methods of the same name but differ by the type of an argument. For example...

Fundamentals of OOD Part 3: Method Cohesion

Single Responsibility Principle (SRP) helps us write more cohesive types and methods. Cohesion is the relatedness of the members of a type to each other and the relatedness parts of a method's code to other parts. Method cohesion Often times a method...