How to Use Named Groups in a C# Regex
A regular expression can do more than say yes, it matches: it can hand back the parts of the text you care about. Give each part a name in the pattern, and read it back by that name instead of by its position.
General Programming Concepts and Languages
View All TagsA regular expression can do more than say yes, it matches: it can hand back the parts of the text you care about. Give each part a name in the pattern, and read it back by that name instead of by its position.
Utf8JsonWriter writes JSON the way you'd type it: open an object, write a property, open an array, close everything again. It writes straight to a stream as UTF-8, without a class to describe the shape first.
Need one ID made from several strings, such as a user and a document? Hash them with SHA-256, but not by gluing them together: "user1" + "23" and "user12" + "3" are the same text, so they get the same hash. Write each part as its length, a colon and the text first, and every combination gets its own ID.
A real .NET C# Web API usually isn't one project. It's a solution: the API itself, plus one or more class libraries for code that doesn't belong in the web layer, such as the database code. This guide builds that structure from the command line with .NET 10, adds the settings that production projects use, and fixes the two errors those settings raise on the template's own code.
JSON (JavaScript Object Notation) is a lightweight data interchange format that's easy for humans to read and write and easy for machines to parse and generate. In Swift, converting strings to JSON objects is a common task, especially when dealing with APIs or data interchange between systems.
Entity Framework Core maps each database table to an entity class and gives you a DbContext to query them. Most of the time you read from a single DbSet, but sooner or later you need data that lives across two tables — exactly what a SQL JOIN gives you. In EF Core, the lambda-based Join() method does the same job, and it translates into real SQL that runs on the database server.
Everything below targets .NET 10 and EF Core 10, the current Long Term Support releases.
appsettings.json is where an ASP.NET Core app keeps its settings — connection strings, API base URLs, feature flags, timeouts. Reading those values comes down to one service, IConfiguration, which ASP.NET Core registers for you. In a console app you build the same thing yourself in a few lines.
This guide covers both, on .NET 10.
When I was working on Node.js project having latest Node.js 24.x, I encountered the error: RangeError: "length" is outside of buffer bounds.
Build a Command-Line Text Analyzer in Python that reads a text file, counts lines or words, displays frequent words, detect long lines.
(2,1): error CS0131: The left-hand side of an assignment must be a variable, property or indexer. It's important to notice that assignment happens from right to left.