Category Archives: C#

The ‘yield’ keyword

The ‘yield’ keyword is something that I’ve just ignored for years and even though I had an idea of what it was doing i’ve actually never used it myself. This is what msdn has to say: When you use the yield keyword in a statement, you indicate that the method, operator, or get accessor in which it appears is […]

[Reflection] Invoking method passed by string

Today I got an idea to do some basic data manipulation through a terminal, and since I’m a bit lazy I wanted to be able to type something like Substring to preform a substring for a string. I was thinking that it should be possible with reflection and sure, I was right 🙂 The only problem […]

Logging with Serilog in .NET

A logger might be one of the most boring task to do while coding, but fortunately there is packages like Serilog that handles that for you. I don’t have that high demands for a logger, as long as it outputs my log entries where I want it and the way I want while beeing easy to use, I’m happy […]

Getting started with unit tests in C#

As a first real post, unit tests seems like a good idea since you are supposed to write unit tests before the real code. Most developers would agree that they are really great when properly maintained, but not a lot of developers really want to write them. From my experience, projects fall in to one of […]