C#
news

48stories

Stories

C#
C# mid-level topics
DVDEV Community: #csharp Manohari Jayachandran Nov 4

C# mid-level day 3: generics, collections, delegates and LINQ

The third instalment of a C# learning series walks through generics, the collection types, delegates and lambdas with closures, events, LINQ and iterators. Each topic gets a short definition, an analogy and a sample, followed by six practice projects with full solutions and a rationale for the design choices. All code targets .NET 8 or later with top-level statements, so each solution runs in a fresh console project.

C# 14
Events and subscriptions

Events and Delegates in C#: Contracts, Subscriptions and Notification

This article explains the difference between delegates and events in C#, the subscription boundary an event creates, and how multicast invocation behaves when a handler throws. It also covers what notification does not guarantee: completion of every subscriber, async handling and subscription lifetime. Read it to design event-based notifications with clearer contracts.

Avalonia 12
Markdown notes, no WebView
HBHabr C# (ru) OlegChe77 Oct 30

Markdown notes app on Avalonia without WebView: lessons from a C# project

A Russian developer built Leaflet, a Windows Markdown notes app in C# on Avalonia 12 with AvaloniaEdit, without WebView or Electron. Notes stay as plain .md files with wiki-style links and backlinks, and the app starts in under a second. The write-up covers live preview, browser-free PDF export and the rough edges of window decorations, caret placement and file-conflict safety.

C# 15
Add your own indexer

C# 15 Extension Indexers: Add [] Syntax to Types You Don't Own

C# 15 lets you declare indexers inside extension blocks, so types you don't own can support square-bracket access. Adding Count and Slice also unlocks index-from-end, ranges, and list patterns. The feature was tested on the .NET 11 RC 1 SDK, and the article lists its gotchas: real indexers win silently, arrays and strings are excluded, and expression trees reject it.

Feedback

Found a bug or have an idea? Your message lands straight in my inbox.

Type of message