.NET Programming Weekly Issue 3 - January 19, 2020
0x00 Introducing Nullable Reference Types in C#
- As the title suggests, this article introduces nullable reference types introduced after C# 8.
- At the beginning of the article, it introduces the origin of the null references and Tony Hoare’s ‘The billion-dollar mistake’, which is an interesting history.
- Introduces the problems existing with reference types before C# 8 when dealing with null references, and how to solve these problems in C# 8 that they add the nullable reference types to express the intent that a reference may be null(written
string?
).
0x01 A look at the internals of ‘boxing’ in the CLR
- If you want to know how the boxing in the CLR works. You just need to read this very helpful article!
- This article first introduces the boxing in the CLR Specification. Then talks the il opcode and the jit code related to the boxing/unboxing in CLR.
- At the end of this article, there are some useful links such as useful code comments related to boxing/unboxing stubs, Stack Overflow Questions etc.
0x02 Structuring Unit Tests
- This article is outdated. But the content of the article is still very inspiring.
- The structure has a test class per class being tested and has a nested class for each method being tested. You can find some examples in the NuGetGallery repository1.
0x03 The Book of the Runtime
- The Book of the Runtime is a set of documents that describe components in the CLR and BCL. They are intended to focus more on architecture and invariants and not an annotated description of the codebase.
- There are some interesting topics, such as Garbage Collection Design, Type System etc.
0x04 Hidden Features of C#?
- A question from Stack Overflow which is viewed 685k times. The original question is outdated. But the features/tricks of C# talked there are interesting/useful.
- You can find many tricks of C#.
0x05 Web Scraping with C#
- This post introduces a collection of articles about web scraping using C#.
- You can find some useful projects on Github, such as AngleSharp2.