languages
C# Articles, Tutorials & News
C# articles, tutorials, and news from the DotNetNews archive.
2640 articles Updated Page 36 of 106
Browse additional C# articles from the DotNetNews archive.
C# articles
Page 36 of 106
Newest first
-
Value vs Reference Types: Why My ASP.NET Core Code Behaved Unexpectedly
Medium Issue #383
Have you ever been puzzled why changing a variable sometimes changes another one, but other times it doesn’t? Or why your program’s memory…
-
7 learnings from Anders Hejlsberg: The architect behind C# and TypeScript
""charp" OR "asp.net" OR "fsharp" OR "c#" OR "vb.net" " - Google News Issue #383
7 learnings from Anders Hejlsberg: The architect behind C# and TypeScript
-
Extract Pages from Word Documents Using C#
Medium Issue #383
When working with Word documents, it’s common to run into situations where you don’t need the entire file. Sometimes you only want a…
-
Repository Pattern in .NET (Simple, Async-Only Guide)
Medium Issue #383
In well-structured .NET applications, persistence is an infrastructure concern. Once database logic bleeds into application or…
-
Prompt Engineering — Zero-Shot, One-Shot, Few-Shot & In-Context Learning
Medium Issue #383
The way you write the prompt matters, so according to the output you expect, you can use the right technique, and this will reduce hallucinations and ensure that the model understands the context and ...
-
Zookeeper with C#.NET — A Gentle, Deep, Example‑Driven Guide
Medium Issue #383
6,500+ Tech Courses. Upgrade Your Skills — Free To Start! Continue reading on CodeToDeploy »
-
C# Random: The Definitive Guide to Reliable Random Numbers in .NET
Medium Issue #382
Generating random numbers in C# is a fundamental task that frequently surfaces during critical workflows for a .NET Developer. Whether…
-
Demystifying async/await in C#: The Hidden State Machine
C# Corner Issue #382
Internal working on async/await in C#
-
.NET 10 and C# 14: The Game Has Changed
C# Corner Issue #381
.NET 10 and C# 14: The Game Has Changed A principal engineer's perspective on why this release matters
-
Zeta: It’s Time to Rethink Validation in .NET
Medium Issue #381
For most of my career, FluentValidation has been the unquestioned default for validation in .NET.
-
5 Most Confusing .NET Interview Questions – Explained for Beginners (With Simple Examples) (Part-1)
C# Corner Issue #381
Ace your .NET interview! Demystifying async/await, dependency injection, service lifetimes, IEnumerable vs IQueryable, and middleware with clear examples. Master these fundamentals!
-
Events in C# Explained with a Real-World Example
C# Corner Issue #381
Learn C# events with a real-world patient recovery scenario! Master the publisher-subscriber pattern, EventHandler<TEventArgs>, and build loosely coupled applications. Ideal for beginners!
-
String Performance: The Fastest Way to Get a String’s Length
WordPress Issue #380
Retrieving the character count of a string in .NET has various methods: using Span with Length, Length, or Enumerable.Count(). This article will prove which is the fastest method.
-
AddTransient vs AddScoped vs AddSingleton in .NET Core (With Examples)
Medium Issue #380
Dependency Injection (DI) is a core feature of .NET Core. It helps create loosely coupled, testable, and maintainable applications.
-
Making foreach on an IEnumerable allocation-free using reflection and dynamic methods
Andrew Lock | .NET Escapades Issue #380
In this post I describe why foreach sometimes allocates, and show how you can use DynamicMethod and Reflection.Emit to go allocation-free
-
How to Remove Specific or Blank Pages from Word Using C# (A Step-by-Step Guide)
Medium Issue #380
When working with Word documents, one problem we often encounter is unwanted pages — blank pages at the end of a report, cover pages we…
-
Create your own Roslyn Analyzer !!
Medium Issue #380
As the title indicates, today we are going to talk about code analyzers and more precisely Roslyn Analyzers, the famous .net compiler. The…
-
Factory Method Pattern in C#
C# Corner Issue #379
Learn how to implement the Factory Method Pattern in C# with dependency injection for loosely coupled object creation. Improve code maintainability and extensibility.
-
10 Reasons to Upgrade to .NET 10
Dev Tips Issue #379
Explore reasons to upgrade to .NET 10 and C# 14: Long-Term Support (LTS) Release, Performance improvements in ASP.NET Core and .NET, File-Based Apps, Server-Sent Events (SSE), Extension Members in C#
-
Nobody Tells You How ASP.NET Core Uses Reflection and Attributes to Wire Controllers and Routes
Medium Issue #378
Have you ever spent hours debugging why your ASP.NET Core API routes aren’t hitting or why your model binding silently fails? You’re not…
-
C # 14 in .NET: What is New and Improved
Medium Issue #378
C# 14 is expected to arrive with .NET 10, and it continues Microsoft’s long-term goal of making C# one of the most powerful, safe, and…
-
Combining the Factory and Strategy Patterns
no dogma blog Issue #378
Download full source code. I was recently talking with a friend about the factory and strategy patterns, how they could be used together. He was familiar with the factory, but not the strategy. The ...
-
Code opinion: why I prefer avoiding the Async suffix in C# asynchronous methods
Code4IT Issue #377
Should every asynchronous method name end with Async? Does it bring more benefits or more downsides? Let’s reason about this habit, which is common among C# developers.
-
Nobody Tells You How Records and Immutability Changed My C# Code — And Why You Should Care
Medium Issue #377
Have you ever struggled with unexpected bugs because your objects changed state unexpectedly? Or wasted time writing boilerplate code for…
-
Building Zero-Allocation Parsers in C# .NET
Medium Issue #377
Creating a zero allocation parser in C# using ref struct.