Blog Posts

  • Top-Level Programs in C# 9

    11/10/2020 3:23:01 AM

    Earlier I blogged about two new features in C# 9: C# 9 Init-Only Properties and C# 9 Record Type. Another feature in C# 9 that I didn't originally plan on writing about is top-level programs. However, top-level programs do simplify sharing sample code on a blog by removing boilerplate code and nesting. Therefore, I'll probably be using it quite a bit on my blog. What are Top-Level Programs in C#...

  • Distributed cache, Media crop picker - This week in Orchard (08/11/2020)

    11/8/2020 6:28:00 PM

    This week we will see the new IDocumentStore, which is a cacheable, committable, and cancellable document store allowing to get documents from a shared cache. And don't forget to watch a demo about how you can add an alt text and crop the images of your Media Field!

  • Guard Clauses in Computer Science

    10/30/2020 2:37:38 PM

    While assisting my computer science students on ways to help debug and improve the clarity and runtime of their code, I explained the concept of guard clauses. Guard clauses are true/false expressions (predicates) found at the top of a method or function that determine whether the function should continue to run. Guard clauses test for preconditions and either immediately return from the method...

  • C# 9 Record Type

    10/22/2020 6:24:00 PM

    In the previous C# tutorial I mentioned the new Init-Only Properties in C# 9. I'll be using the new init accessor in this tutorial as well with the new record type in C# 9. Record Types are Not Immutable by Default Before we dive into the cool new record type features, however, I want to mention that most of the C# tutorials are focusing on the record type in terms of immutability. Although it's...

  • C# 9 Init-Only Properties

    10/17/2020 1:39:00 PM

    C# 9 introduces init-only properties that allow you to set properties on a class that can only be set once during object initialization. This is done using a new init accessor introduced in C# 9 as part of a class declaration. public class Person { public string Name { get; init; } public int Age { get; init; } } The Person class can now have it's Name and Age properties set once during...

Send us new blog feeds

Noticed that a blog's feed is missing from the list? 

We would love to add that to the feed list, so please don't hesitate to inform us on the following e-mail adress:

crew@lombiq.com

See our privacy policy.