C# Attributes Basics

Featured Imgs 23

Attributes are a powerful method of associating metadata or declarative information with code.

You can think of attributes as adding tags/notes to code:

Delegates: Can’t Deal With Them, Can’t Live Without Them

Featured Imgs 26

Introduction

There is a famous quote by Jim Henson: “If you can’t beat themJoin them”.

It’s possible to write code for years without deliberately using delegates. I say “deliberately” because we may have used them without realizing it. Knowing what these types represent makes reading code easier. Knowing how to use them adds some useful tools to our developer toolbox. So instead of ignoring them, why not learn them. In this post, I will show you how you can get started with delegates and their use cases, which will encourage you to use them more in your code.