C# - Mastering the Basics - The Repository Pattern

There’s a very large number of articles about the repository pattern out there. Nevertheless, most of them overlap in the description and cause confusion among developers. For this reason I decided to write my own article to document my opinion. In this article I will first clarify the what and why of the repository pattern. Afterwards I will explain how the pattern can look like in C#. In his book, Patterns of Enterprise Application Architecture, Martin Fowler describes the Repository Pattern as a “Mediate between the domain and data mapping layers, acting like an in-memory collection of domain objects”. ...

May 13, 2018 · 4 min · Marcel Jurtz

C# - Mastering the Basics - Events and Delegates

Delegates and Events are powerful tools in C#, but they can definitely be confusing in the beginning. Todays article covers the basics of this topic and helps you to get comfortable implementing this approach in your own applications. Delegates I think, the main problem is that delegates are often explained unnecessarily complicated. For this reason, I want to give you an easily understandable introduction. Let’s look at a basic delegate declaration: ...

April 26, 2018 · 8 min · Marcel Jurtz

C# – Mastering the Basics – Operator Overloading

Most of the built-in operators that are available in C# can be redefined. In todays article, I’ll be showing you how you can redefine operators to match your custom classes. Additionally, I’ll cover which operators actually can be overwritten. Redefining Operators To create custom functionality for operators in combination with your own classes, you’ll simply need to create methods matching a specific pattern. These methods require the usage of the keyword operator, followed by the actual operator you’ll want to overwrite. ...

January 21, 2018 · 4 min · Marcel Jurtz

C# – Mastering the Basics – Lambda Expressions

Are you one of the people who are easily intimidated by complicated-looking things? I felt a little bit like that when I saw lambda expressions for the first time. But let me tell you this: they really only look scary on the very first look. This article covers the basics of using lambda expressions and should be seen as quick introduction rather than extensive documentation. What are Lambda Expressions? Lambda expressions somehow belong to the anonymous methods. However, they are not called expression instead of method for nothing. They are therefore only similar, not identical. Under a certain circumstance, i. e. the assignment of a delegate, they can be used identically. ...

January 18, 2018 · 4 min · Marcel Jurtz

Xamarin Debugging over WIFI

Xamarin utilizes the Android Debug Bridge (ADB) for debugging on physical devices, which are usually connected over usb. While this feature definitely is useful, it would sometimes be more practical if you could do this over WIFI instead. Luckily, that is possible! You can simple switch between using USB and TCP/IP for debugging. To get started, you need to connect your device via USB to the computer you’re debugging from. I’m using Windows, so the commands I’ll execute the following commands from the commandline (which runs as an administrator), but since they are adb commands, they should be the same on Linux or macOS. ...

January 10, 2018 · 2 min · Marcel Jurtz