Microsoft .NET Code Analysis: Always Use Accessibility Modifiers

Accessibility modifiers are crucial in Object-Oriented Programming, influencing visibility and encapsulation of types. A recent codebase analysis uncovered 314 missing modifiers, highlighting their importance for maintaining internal implementation details, security, and code organization. Proper usage enhances maintainability, reduces errors, and aids in understanding code interactions among developers.

Microsoft .NET Code Analysis: Inline Variable Declaration

Starting with .NET 7, it is recommended to inline variable declarations when calling a method with an out parameter, as it improves code readability, reduces scope, encourages immutability, facilitates easier refactoring, and can lead to performance optimizations. Updated March 2024.

Microsoft .NET Code Analysis: Use Pattern Matching to Avoid ‘As’ Followed by A ‘Null’ Check

The introduction of the "is" keyword in .NET Framework 2.0 promotes better practices by eliminating redundant null checks. Pattern matching enhances code readability and performance, allowing type checking and extraction in one statement. Embracing this change can significantly streamline your code. For further insights, consider the author’s books and resources.

Microsoft .NET Code Analysis: Remove Unnecessary Using Directives

I always remove unnecessary using directives for a few reasons that I discuss in detail in my coding standards book and conference session. This article discusses the reasons why this is important.

Boost Your .NET Projects with Spargine: Throwing Exceptions Made Easy with ExceptionThrower

The author explores the implementation of an ExceptionThrower class in Spargine’s DotNetTips.Spargine.6.Core assembly, inspired by Microsoft's .NET. This class simplifies exception handling by offering various methods for common and custom exceptions, facilitating error handling, debugging, and communication in coding to enhance robustness and user experience.

Code Quality: Formatting Classes in Microsoft .NET to Make Them Easy to Read and Modify

This article emphasizes the importance of formatting classes in Microsoft .NET to improve readability, maintainability, and consistency. It provides guidelines for structuring class files, including headers, imported namespaces, class namespaces, constructors, events, properties, methods, and the use of blank lines for code organization. The article also recommends using documentation tools like GhostDoc and adhering to coding standards for better code quality.

Coding Faster with dotNetTips.com Spargine 6: November 2022 Release

I am pleased to announce the new release (v2022.6.11.14) of Spargine on November 14th, 2022, my open-source projects, and NuGet packages for .NET 6 & 7. I have added new classes, methods, benchmarks, and unit tests! I use these in all the projects I work on, including many in production!

Unit and Benchmark Testing with Random Data in .NET 6 & 7

This article shows how to use the DotNetTips.Utility.Standard.Tester NuGet package to generate random data for use in unit and benchmark testing.

DotNetDave Rocks On .NET Live

For the first time, I will be on the live show On .NET Live, on August 22nd, 2022 at 9 am PST. I'm so excited to chat about two of my favorite subjects, code quality, and code performance! This is going to be fun.

dotNetDave Rocks the Code Quality Conference 2022

The dotNetDave For Those About to Code: Worldwide Tour will be at the Code Quality Conference 2022 on August 19th. Last year we had over 72K software engineers watch the conference and I hope you will watch it this year to learn how to rock your code to release quality applications and services that meet your user's needs.