Examples of Composition in C# – A Simple Guide for Beginners
Check these examples of composition in C#! Learn about composition in object-oriented programming with these simple code examples in C# - perfect for beginners!
Check these examples of composition in C#! Learn about composition in object-oriented programming with these simple code examples in C# - perfect for beginners!
See examples of inheritance in C# in this introductory guide to object oriented programming. Learn about when to use inheritance in C# and... when not to!
Learning about Object Oriented Programming? We'll cover what are classes in C# and look at OOP and interfaces in C# to learn about when we should use them!
Code Smells Welcome to the third edition of Code Smells! Periodically I’ll be posting about how to detect code smells and what they mean in terms of the big picture of your code. The previous installment can be found right here. What’s a code smell? Wikipedia says it perfectly: In computer programming, code smell is any symptom in the source code of a program that possibly indicates a deeper problem. Code smells are usually not bugs—they are not technically incorrect and don’t currently prevent the program from functioning. Instead, they indicate weaknesses in design that may be slowing down development or increasing the risk of bugs or failures in the future. These code smells are often based on my own opinion and experience with programming. If you disagree with what I'm saying in my post, please don't hesitate to post a comment.…
Background: Lambdas and Why This Example is Important Based on your experience in C# or other programming languages, you may or may not be familiar with what a lambda is. If the word "Lambda" is new and scary to you, don't worry. Hopefully after reading this you'll have a better idea of how you can use them. My definition of a lambda expression is a function that you can define in local scope to pass as an argument provided it meets the delegate signature. It's probably pretty obvious to you that you can pass in object references and value types into all kinds of functions... But what about passing in a whole function as an argument? And what if you just want to declare a simple anonymous method right when you want to provide it to a function? Lambdas. So…