The article discusses the common programming practice of providing access to data collections through properties and highlights the issue of mutability in such properties, which can lead to undesirable collection replacements. To adhere to best practices, the article recommends either removing the property setter or using the init modifier to make the property read-only, emphasizing that read-only properties with collections are supported by binary and XML serialization.
[New post] Microsoft .NET Code Analysis: Make Collection Properties Read-Only
Older messages
[New post] Microsoft .NET Code Analysis: Simplify LINQ Expressions
Tuesday, November 21, 2023
dotNetDave posted: " In much of the source code I analyze, I often come across LINQ expressions that utilize Lambda expressions combined with methods like Where() and FirstOrDefault(). While this
[New post] Microsoft .NET Code Analysis: Utilize the Pattern Matching ‘not’ Operator
Tuesday, November 21, 2023
dotNetDave posted: " Throughout my experience with C# coding, I've never been particularly fond of the '!' (bang) operator. This is mainly because it can easily go unnoticed when
[New post] Microsoft .NET Code Analysis: Utilize Pattern Matching to Eliminate the Need for an ‘is’ Check
Tuesday, November 14, 2023
dotNetDave posted: " In a significant portion of the code I examine, developers often perform multiple type conversions within a single code block, as demonstrated in this example: if (value is
[New post] Analyzing Performance Issues in Microsoft .NET 8
Tuesday, November 14, 2023
dotNetDave posted: " Over the past few months, I have been conducting extensive performance benchmarking on .NET 8 with the aim of sharing my findings at conferences such as the Copenhagen
[New post] Microsoft .NET Code Analysis: Use nameof() To Retrieve the Parameter Name
Tuesday, November 7, 2023
dotNetDave posted: " In many of the codebases I review when I join a new project, I often come across code that throws exceptions, like the example below from one of these projects: public
You Might Also Like
Card Buddy/Bread Book/Pocket Translator
Sunday, May 5, 2024
Recomendo - issue #409 ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏
Kotlin Weekly #405
Sunday, May 5, 2024
ISSUE #405 5th of May 2024 Hello Kotliners! We're already in May and getting closer to KotlinConf. Any predictions for the keynote announcements? Check out our selection of links for the upcoming
📈 Why Is My Ping So High While Gaming? — How to Keep Your Android From Overheating
Saturday, May 4, 2024
Also: Using ChatGPT to Craft a Resume, and More! How-To Geek Logo May 4, 2024 📩 Get expert reviews, the hottest deals, how-to's, breaking news, and more delivered directly to your inbox by
JSK Daily for May 4, 2024
Saturday, May 4, 2024
JSK Daily for May 4, 2024 View this email in your browser A community curated daily e-mail of JavaScript news The Power of React's Virtual DOM: A Comprehensive Explanation Modern JavaScript
Daily Coding Problem: Problem #1431 [Medium]
Saturday, May 4, 2024
Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by MongoDB. Given a list of elements, find the majority element, which appears more than
Ranked | The World's Top Media Franchises by All-Time Revenue 📊
Saturday, May 4, 2024
From Pokémon to Star Wars, some media franchises are globally recognizable. How do media franchises compare in terms of all-time revenue? View Online | Subscribe Presented by Voronoi: The App Where
Noonification: Read Code Like a Hacker With the SAST
Saturday, May 4, 2024
Top Tech Content sent at Noon! Get Algolia: AI Search that understands How are you, @newsletterest1? 🪐 What's happening in tech today, May 4, 2024? The HackerNoon Newsletter brings the HackerNoon
Weekend Reading — May the fourth
Saturday, May 4, 2024
This week we setup our new Minecraft server, play Spacewar, avoid burnout, wonder about Facebook AI spam, lose our passkeys, and claim stairs on the way back home. 😎 Labnotes (by Assaf Arkin) Weekend
Google lays off workers
Saturday, May 4, 2024
Plus: Tesla cans its Supercharger team and UnitedHealthcare reveals security lapses View this email online in your browser By Kyle Wiggers Saturday, May 4, 2024 Image Credits: Tomohiro Ohsumi / Getty
When It Rains, It Pours ☔
Saturday, May 4, 2024
Why the umbrella's design can't be beat. Here's a version for your browser. Hunting for the end of the long tail • May 04, 2024 Hey there, Ernie here with a refreshed piece about umbrellas