C#
17 guides on C#.
30 .NET AI & Agent Interview Questions (With Answers That Actually Land)
The AI questions .NET developers are being asked in 2026 — fundamentals, Microsoft.Extensions.AI, the Agent Framework, RAG, tools and production concerns — with model answers and what each one is really testing.
Migrating from Semantic Kernel to the Microsoft Agent Framework: A C# Walkthrough
A line-by-line C# migration from Semantic Kernel agents to the Microsoft Agent Framework — namespaces, agent creation, threads, tools, invocation, options and DI, with before/after code for each.
Text-to-SQL in .NET: Letting Users Query a Database in Plain English (Safely)
Build a natural-language-to-SQL feature in C# — schema grounding, a read-only execution boundary, statement validation and the failure modes that decide whether it survives production.
Using the Anthropic Claude API in C#
How to call Anthropic's Claude models from C#: authenticate, send a message, stream the response, and use Claude through the provider-agnostic Microsoft.Extensions.AI abstraction.
Build a "Chat with your PDF" App in .NET
Let users ask questions about a PDF and get grounded answers. Build a chat-with-your-documents app in C# using extraction, embeddings, and retrieval-augmented generation.
How to Count Tokens in C#
Tokens drive LLM cost and context limits. How to count tokens in C# with a tokenizer, estimate cost before a call, and keep prompts under the model's limit.
Embeddings in .NET, Explained
What are embeddings, and how do you generate and use them in C#? A clear, practical explanation of vector embeddings for .NET developers — with code and use cases.
Using Google Gemini in C# and .NET
How to call Google's Gemini models from C#: get an API key, send a prompt, stream responses, and use Gemini through a provider-agnostic interface in .NET.
Microsoft.Extensions.AI: The .NET AI Abstraction, Explained
Microsoft.Extensions.AI gives .NET one common interface for every AI provider. What IChatClient and IEmbeddingGenerator are, why they matter, and how to use them.
How to Use Function Calling with OpenAI in C#
Function calling lets an OpenAI model trigger your C# code. A step-by-step guide to defining functions, letting the model call them, and returning the result — in .NET.
Prompt Engineering for .NET Developers
Prompt engineering, minus the hype. Practical techniques .NET developers can use to get reliable, consistent output from an LLM — with C# examples.
Chunking Strategies for RAG (with .NET Examples)
Bad chunking is the #1 reason RAG underperforms. A practical guide to chunking strategies — size, overlap, and structure-aware splitting — for .NET RAG apps.
Resilient LLM Calls in .NET with Polly
LLM APIs rate-limit, time out, and hiccup. Make your .NET AI calls resilient with Polly — retries with backoff, circuit breakers, and timeouts done right.
Building Semantic Search in C# with Embeddings
Keyword search misses meaning. Build semantic search in C# using embeddings and vector similarity, so queries match by intent — not just matching words.
Building Your Own MCP Server in C#
Expose your tools to any AI agent by building an MCP server in C#. A practical walkthrough of the Model Context Protocol server SDK, defining tools, and choosing a transport.
How to Call the OpenAI API from C# (2026 Guide)
A step-by-step guide to calling the OpenAI API from C#: install the SDK, send your first chat completion, stream responses, and keep your API key safe in .NET.
Running a Local LLM in .NET with Ollama
Run an LLM locally and call it from C# with Ollama — no API key, no cloud, no per-token cost. How to connect .NET to a local model and when local makes sense.