All articles

#csharp

22 articles tagged csharp

Sep 18, 2026.NET

Background Jobs in .NET: BackgroundService, IHostedService, and When You Need Hangfire

Dotnet background jobs compared: BackgroundService, IHostedService, queues and Hangfire — persistence, retries, scaling, and which to choose when.

Advanced5 min read
Sep 15, 2026AI & LLMs

Running Local LLMs with Ollama and C#: A Step-by-Step Guide

Ollama C# tutorial: run Llama and other open models locally and call them from .NET via OllamaSharp or the OpenAI-compatible API — private and free.

Beginner4 min read
Sep 11, 2026.NET

Nullable Reference Types in C#: A Practical Migration Guide for Legacy Code

Enable nullable reference types in an existing .NET project without drowning in warnings: a file-by-file migration strategy, annotations, and pitfalls.

Advanced4 min read
Sep 8, 2026AI & LLMs

Getting Reliable JSON Out of LLMs in C#: Structured Output That Doesn't Break

LLM structured output in C#: use OpenAI structured outputs and JSON schema to get typed, deserializable results — no more regex-parsing model prose.

Intermediate5 min read
Sep 4, 2026Career

C# Interview Questions I Actually Ask Junior Developers (With Good Answers)

Real C# interview questions for junior developers, from someone who runs the interviews — what each question tests and what a strong answer sounds like.

Beginner5 min read
Sep 1, 2026.NET

Minimal APIs vs Controllers in ASP.NET Core: What I Pick and Why

Minimal API vs controller in ASP.NET Core: performance, filters, validation, testability and team fit — a senior engineer’s practical decision guide.

Intermediate4 min read
Aug 28, 2026AI & LLMs

LLM Function Calling in C#: Letting the Model Safely Run Your Code

Function calling with OpenAI in C#: how tool calls work under the hood, the invocation loop, and the security rules for exposing .NET methods to an LLM.

Advanced5 min read
Aug 25, 2026.NET

C# Records vs Classes vs Structs: A Decision Guide With Examples

When to use a C# record vs class vs struct: value equality, immutability, allocation behavior, and a practical decision tree with real code examples.

Intermediate5 min read
Aug 21, 2026AI & LLMs

Understanding Embeddings and Vector Search in .NET (With Real Code)

Vector embeddings in .NET explained: what embedding vectors are, cosine similarity in C#, semantic search, and when you need a real vector database.

Intermediate5 min read
Aug 14, 2026.NET

LINQ Performance: When It's Slow and What to Do About It

LINQ performance best practices from production .NET: multiple enumeration, Count vs Any, allocation costs, and when a plain loop beats a query.

Advanced5 min read
Aug 11, 2026AI & LLMs

RAG Explained for .NET Developers: Build a Document Q&A System in C#

RAG C# implementation guide: chunking, embeddings, vector search and grounded prompts — build a document Q&A system in .NET with real code.

Intermediate5 min read
Aug 7, 2026.NET

Fixing the N+1 Query Problem in Entity Framework Core

Diagnose and fix the EF Core N+1 query problem with Include, projections and split queries — plus how to catch lazy-loading traps before production.

Intermediate4 min read
Aug 4, 2026AI & LLMs

Building Your First AI Chatbot in C# with Semantic Kernel

Semantic Kernel C# tutorial: build a chatbot with conversation memory, plugins, and streaming in ASP.NET Core — a complete working example for .NET devs.

Beginner4 min read
Jul 28, 2026.NET

Dependency Injection in .NET: Lifetimes, Captive Dependencies, and Other Traps

Understand .NET DI service lifetimes — singleton, scoped, transient — and avoid captive dependencies, memory leaks and threading bugs in ASP.NET Core.

Advanced5 min read
Jul 24, 2026AI & LLMs

Getting Started with Microsoft.Extensions.AI: One Interface for Every LLM in .NET

Microsoft.Extensions.AI tutorial: use IChatClient to swap OpenAI, Azure and Ollama models freely, add middleware, and future-proof your .NET AI code.

Intermediate4 min read
Jul 21, 2026.NET

Async/Await in C#: 8 Mistakes Even Experienced Developers Make

Learn the most common async await C# mistakes — async void, .Result deadlocks, missing ConfigureAwait and more — with fixes from production code.

Intermediate5 min read
Jul 15, 2026AI & LLMs

How to Call the OpenAI API from C#: A Complete Guide for .NET Developers

Step-by-step OpenAI API C# example: install the official SDK, send chat completions, stream responses, handle errors and costs — no Python required.

Beginner5 min read
Jan 19, 2025Fundamentals

Error Handling and Debugging in C#: Writing Robust and Reliable Code

Master error handling and debugging in C# programming. Learn about try-catch blocks, common exceptions, debugging techniques, and best practices for building reliable applications that handle unexpected situations gracefully.

Beginner14 min read
Jan 18, 2025Fundamentals

Introduction to Object-Oriented Programming in C#: Building with Classes and Objects

Discover the power of Object-Oriented Programming in C#. Learn about classes, objects, properties, constructors, and encapsulation with practical examples that make OOP concepts clear for beginners.

Beginner13 min read
Jan 17, 2025Fundamentals

Functions and Methods in C#: Building Reusable and Organized Code

Learn how to create functions and methods in C# to organize your code, avoid repetition, and build more maintainable programs. Perfect for beginners ready to structure their code professionally.

Beginner11 min read
Jan 16, 2025Fundamentals

Control Flow in C#: Making Your Programs Smart and Interactive

Learn how to make decisions and create loops in C# programming. Master if/else statements, switch statements, and loops to build dynamic, interactive programs that respond to different conditions.

Beginner9 min read
Jan 15, 2025Fundamentals

Understanding Variables and Data Types in C#: Your First Step into Programming

Learn the fundamentals of variables and data types in C# with clear examples. Perfect for programming beginners who want to understand how computers store and work with different kinds of information.

Beginner6 min read