Fading Coder

One Final Commit for the Last Sprint

Cross-Platform Mutex Behavior in .NET: Windows vs Linux

The Mutex class in C# enables cross-process synchronization on Windows, making it suitable for singleton instance detection. However, this capability breaks down in Linux environments for both Mono and .NET Core (3.1) runtimes. Test Implementation using System; using System.Threading; namespace Mute...

Implementing Complex Types in Entity Framework Code First

In Entity Framwork (EF) Code First development, a Complex Type is a class that serves as a container for properties but lacks its own identity (i.e., it does not have a primary key). Unlike standard entity types, complex types are not mapped to their own database tables. Instead, their properties ar...

Understanding String Immutability and Interning in C#

In the C# language, the string type is a reference type. Unlike value types which are stored on the stack, string objects reside on the managed heap. Under normal reference type rules, assigning one variable to another typically means both variables point to the same memory address, and modifying on...

JSON Deserialization Strategies for .NET Applications Using Newtonsoft.Json

When working with JSON data in .NET, the Newtonsoft.Json (Json.NET) library provides robust mechanisms for serialization and deserialization. One common approach involves parsing a JSON string into a JObject to extract specific properties and convert them into strongly typed objects.Deserializing Si...

Diagnosing High CPU Usage in Production Systems with Windbg

For this demonstration, we'll use a 64-bit environment with a .NET 4.0 application built with Visual Studio 2019. Ensure you have the correct version of Windbg (64-bit) installed. Creating a Test Scenario We'll simulate high CPU usage with a sample application containing an ententional infinite loo...

ModernWMS: Open-Source .NET Warehouse Management System Deployment Guide

Overview of ModernWMS ModernWMS is a lightweight yet comprehensive open-source Warehouse Management System (WMS) developed using the .NET framework. The application is designed with cross-platform compatibility in mind, allowing a single codebase to be deployed across various operating systems seaml...

Generic Dictionary Implementation in C#

The Dictionary<TKey, TValue> class in the System.Collections.Generic namespace is a powerful collection designed for high-performance data retrieval using keys. It maps unique keys to specific values, providing an average time complexity of O(1) for lookups. Core Characteristics Namespace: Req...

Hierarchical Log File Organization in C# .NET

Organize diagnostic logs on disk using a tiered directory structure: a root Log folder contains subdirectories for each service, which in turn hold monthly folders, with individual plain-text files for each calendar day. The helper below traverses upward from the executable location to establish a p...

File Compression and Decompression Components for .NET

1. Overview of Compression Formats Data compression is a process of encoding information using fewer bits than the original representation. Common lossless compression algorithms include LZW, ZIP, RAR, and 7-Zip. Below is a comparison of mainstream formats: ZIP: A widely used format employing the De...

Implementing PLC Communication for .NET HMI Applications

Create a Windows Forms (.NET Framework) project as the base for the HMI application. UI Asset and Control Configuration Create an images directory in the project's Debug output folder to store static PNG and animated GIF assets for equipment state display and button states. Add a PictureBox control...