Skip to content

C#

September 29, 2023
April 23, 2020

Introduction to the C# Language and the .NET Framework | Microsoft Docs
C# docs - get started, tutorials, reference. | Microsoft Docs

.NET documentation | Microsoft Docs .NET Core guide
.NET API browser | Microsoft Docs

C# is an ECMA standard with different implementations
What is the difference between C# and .NET? - Stack Overflow
C# is the programming language, it requires a runtime to target to (.NET/UWP for Microsoft's implementation)
.NET covers the .NET framework libraries and the common language runtime for .NET assemblies (one of C#'s target). The .NET CLR supports multiple languages (C++, C#, F#, VB) and a unified development flow in CLI, e.g. dotnet run app. It is initially all about cross platform (console/server) applications.
dotnet/csharplang: The official repo for the design of the C# programming language
Introduction - C# language specification | Microsoft Docs
Pattern matching - C# 7.0 specification proposals | Microsoft Docs
C# 9: Value Objects and Simpler Code -- Visual Studio Magazine
What’s Next in C# - YouTube 2023-08, record, pattern matching

C# docs - get started, tutorials, reference. | Microsoft Docs
samples/csharp at master · dotnet/samples

C# Corner - Community of Software and Data Developers
C# Tutorial for Beginners and Professionals with Source Code
Tutorials - C#, WPF, ASP.NET MVC, WCF, Entity Framework, AngularJS and MVVM Frameworks - MVVM Light - DotNetPattern.com
csharp.christiannagel.com – Christian Nagel about C#, ASP.NET Core, UWP, Xamarin, Azure, and more
Dot Net Perls
C# Programming Language - GeeksforGeeks
C# tutorial - beginner C# tutorial
.NET Core series - Serverless, GraphQL, NuGet, testing, Entity Framework and more - DEV Community 👩‍💻👨‍💻

Microsoft
Console Application | Microsoft Docs
C# Console UWP Applications - Windows Developer Blog
C# Fundamentals for Absolute Beginners | Channel 9
Learn C# for Beginners – Microsoft Virtual Academy
C# 101 - YouTube
C# Advanced - YouTube
.NET Core 101 - YouTube
Desktop and .NET Core 101 - YouTube

C# Tutorial For Beginners - Learn C# Basics in 1 Hour - YouTube Mosh
C#.NET Tutorials - YouTube Mosh
IAmTimCorey - YouTube C# playlists
C# Fundamentals for Absolute Beginners - YouTube

15 C# Project Ideas: Beginner to Expert [With tutorial] - DEV with links to learning videos
C# Tutorial for Beginners and Professionals with Source Code
Programmr | Programmer's Playground
C# Online Compiler | .NET Fiddle

History

The Evolution of C# | DotNetCurry

How Microsoft rewrote its C# compiler in C# and made it open source

Versions

C# language versioning - C# Guide | Microsoft Docs
csharplang/Language-Version-History.md at master · dotnet/csharplang
roslyn/Language Feature Status.md at master · dotnet/roslyn

.net - What are the correct version numbers for C#? - Stack Overflow versions, C# 8.0 released with .NET Core 3.0 and VS2019 v16.3

CLI Tools

.NET Core CLI | Microsoft Docs
Get started with .NET Core using the CLI - .NET Core | Microsoft Docs
Organizing and testing projects with the .NET Core CLI - .NET Core | Microsoft Docs
Organizing and testing projects with the .NET Core CLI - .NET Core | Microsoft Docs
Install and manage NuGet packages using the dotnet CLI | Microsoft Docs
10 commands you don't want to be without in .NET Core
.NET Core Command-line Interface

Application publishing - .NET Core | Microsoft Docs
.NET Core Runtime IDentifier (RID) catalog | Microsoft Docs runtime ID = platform
How YOU can create reusable packages for .NET Core using VS Code, C# and NuGet - DEV

Develop libraries with the .NET Core CLI - .NET Core | Microsoft Docs targets

Target FrameworkTarget Framework Moniker (TFM)
.NET 5net50
.NET Core 3.0netcoreapp3.0
.NET Standard 1.4netstandard1.4
.NET Framework 4.8net48
dotnet new console -n cli  # `cli/` created
dotnet build
dotnet build cli.csproj
dotnet run
dotnet run bin/Debug/netcoreapp3.1/cli.dll

dotnet new classlib -n lib  # `lib/` created

dotnet new solution -n test # `test.sln` created
dotnet sln add cli/
dotnet sln add lib/

# add package dependency to `lib` project
dotnet add lib/ package Humanizer.Core
# add reference dependency to `cli` project
dotnet add cli/ reference lib/

dotnet list package

# release x86 build to RELEASE/
dotnet publish -c Release  -r linux-x86 -o RELEASE/

dotnet pack

Project

.NET Core project SDK overview - .NET Core | Microsoft Docs

Brainstorming - Creating a small single self-contained executable out of a .NET Core application - Scott Hanselman
Hubert-Rybak/dotnet-warp: .NET Core global tool for producing single executable using Warp

.NET Core 3 .csproj:
https://github.com/dotnet/samples/blob/master/wpf/WPF-WinRT/WPF-WinRT-Core/WPF-WinRT-Core.csproj
.NET Framework 4 .csproj:
https://github.com/dotnet/samples/blob/master/wpf/WPF-WinRT/WPF-WinRT-NetFx/WPF-WinRT-NetFx.csproj

Build

.NET Core Runtime IDentifier (RID) catalog | Microsoft Docs runtime ID = platform
Making a tiny .NET Core 3.0 entirely self-contained single executable - Scott Hanselman <PublishTrimmed>, <PublishSingleFile>
are these outdated?

Application publishing - .NET Core | Microsoft Docs
In .NET Core 3.0, self-contained deployments support assembly trimming (tree-shaking)
However, dynamically accessed assemblies (through Reflection) have to be added manually

Check .csproj's <TargetFramework> and <PackageReference> for framework and library dependencies.
MSBuild - Visual Studio | Microsoft Docs
Target frameworks in SDK-style projects - .NET | Microsoft Docs target framework moniker (TFM)
Tips & Tricks to improve your .NET Build Setup with MSBuild – Webinar recording | JetBrains Blog

Check Package.appxmanifest

Tools

Tools can be global, global at custom location or local to repository.

.NET Core tools - .NET Core CLI | Microsoft Docs
natemcmaster/dotnet-tools: A list of tools to extend the .NET Core command line (dotnet)
ToolGet - Search for .NET Tools from NuGet
Diagnostics tools overview - .NET Core | Microsoft Docs
Additional tools - .NET Core | Microsoft Docs
.NET Core Global Tools - (What are Global Tools, How to Create and Use them) | DotNetCurry

.NET Script

filipw/dotnet-script: Run C# scripts from the .NET CLI.

dotnet tool install -g dotnet-script # once

dotnet script init

C# Scripting using dotnet-script - Elliot DeNolf

Hitchhiker’s Guide to the C# scripting | by Ali Bahraminezhad | ITNEXT
scriptcs - Write C# scripts in your favorite text editor
Scriptcs

Styling

Framework Design Guidelines | Microsoft Docs
Naming Guidelines - Framework Design Guidelines | Microsoft Docs
Names of Namespaces - Framework Design Guidelines | Microsoft Docs

Syntax/Built-ins

Keywords

C# Keywords | Microsoft Docs

The proper usages of the keyword 'static' in C# - NDepend

fixed Statement - C# Reference | Microsoft Docs unsafe code
Using Fixed Keyword in C#

lock statement - C# reference | Microsoft Docs acquire lock from objects

delegate operator - C# reference | Microsoft Docs anonymous function, replace by lambda function
Built-in reference types - C# reference | Microsoft Docs

Method Parameters - C# Reference | Microsoft Docs
in parameter modifier - C# Reference | Microsoft Docs
out parameter modifier - C# Reference | Microsoft Docs
ref keyword - C# Reference | Microsoft Docs

String

String.Format Method (System) | Microsoft Docs
$ - string interpolation - C# reference | Microsoft Docs
@ - C# Reference | Microsoft Docs raw string

StringBuilder Class (System.Text) | Microsoft Docs

Writing Efficient String Functions in C# | DotNetCurry

String Format for DateTime [C#]

Records

modifier for class/struct to be like a value
record class's properties are init only
but structs are mutable by design as they are not shared, use readonly record struct for immutability
value-based equality semantic (instead of reference)

C# 9.0 - Introduction To Init-Only Property
Use record types - C# tutorial - C# | Microsoft Learn
C# 9.0 - Introduction To Record Types

LINQ

Language-Integrated Query (LINQ) (C#) | Microsoft Docs
Language Integrated Query (LINQ) in C# | Microsoft Docs
Working with LINQ | Microsoft Docs

Querying JSON using LINQ | DotNetCurry
C# LINQ - Dot Net Perls

Understand monads with LINQ - codewithstyle.info

using System;
using System.Linq;

class Program
{
    static void Main()
    {
        // Step 1: an unsorted string array.
        string[] letters = { "d", "c", "a", "b" };

        // Step 2: use query to sort the array alphabetically.
        var sorted = from letter in letters
                     orderby letter
                     select letter;

        // Step 3: loop with the foreach keyword.
        foreach (string value in sorted)
        {
            Console.WriteLine(value);
        }
    }
}

Attributes

associating information with code in a declarative way, like annotations of other languages

Tutorial: Use attributes - C# | Microsoft Docs
Attributes (C#) | Microsoft Docs
C# reserved attributes: Conditional, Obsolete, AttributeUsage | Microsoft Docs

[Abc] attribute corresponds to the AbcAttribute class.
Take note of Attribute's AttributeUsageAttribute as to where it can be applied.

Attribute Class (System) | Microsoft Docs

Exceptions

The proper usages of Exceptions in C# - NDepend
.Net Exceptions Best Practices - When Catch or Throw Exception

common exceptions - elmah.io Blog | elmah.io category

.net - How to rethrow InnerException without losing stack trace in C#? - Stack Overflow

CSE

Corrupted State Exceptions from unmanaged code, from the documentation this is not forwarded to managed code
CLR Inside Out - Handling Corrupted State Exceptions | Microsoft Docs
HandleProcessCorruptedStateExceptionsAttribute Class (System.Runtime.ExceptionServices) | Microsoft Docs
c# - Gracefully handling corrupted state exceptions in .NET Core - Stack Overflow $env:COMPlus_legacyCorruptedStateExceptionsPolicy
Access Violation in Marshal.StructureToPtr is not translated to the AccessViolationException · Issue #13805 · dotnet/runtime
Debugging System.AccessViolationException - DllImport hell | elmah.io save Dump and WinDbg
microsoft/clrmd: Microsoft.Diagnostics.Runtime is a set of APIs for introspecting processes and dumps. dump viewer

Collections

How to Choose the Right .NET Collection Class? | DotNetCurry

switch/pattern matching

Use pattern matching features to extend data types | Microsoft Docs
Moving from the switch statement to switch expressions (C# 8) – csharp.christiannagel.com

namespace cli
{
    public class Point
    {
        public int X { get; }
        public int Y { get; }

        public Point(int x, int y) => (X, Y) = (x, y);

        public void Deconstruct(out int x, out int y) =>
            (x, y) = (X, Y);

        public static Quadrant GetQuadrant(Point point) => point switch
        {
            (0, 0) => Quadrant.Origin,
            var (x, y) when x > 0 && y > 0 => Quadrant.One,
            var (x, y) when x < 0 && y > 0 => Quadrant.Two,
            var (x, y) when x < 0 && y < 0 => Quadrant.Three,
            var (x, y) when x > 0 && y < 0 => Quadrant.Four,
            var (_, _) => Quadrant.OnBorder,
            _ => Quadrant.Unknown
        };
    }

    public enum Quadrant
    {
        Unknown,
        Origin,
        One,
        Two,
        Three,
        Four,
        OnBorder
    }
}

Interface

Jeremy Bytes: A Closer Look at C# 8 Interfaces

C# Interfaces - Introduction

Extension

Extension Methods - C# Programming Guide | Microsoft Docs
Extension Methods in C#

Extension example

Add index when looping

public static IEnumerable<(T item, int index)> WithIndex<T>(this IEnumerable<T> self) => self.Select((item, index) => (item, index));

Delegate/Events

Handling and Raising Events | Microsoft Docs

Introduction to Delegates | Microsoft Docs
Delegates - C# language specification | Microsoft Docs
Delegates vs. events | Microsoft Docs

Event vs. Delegate - DZone Web Dev
Delegates and Events in C# / .NET
C# delegate v.s. EventHandler - Stack Overflow

Memory

C# - All About Span: Exploring a New .NET Mainstay | Microsoft Docs
Unsafe code, pointers to data, and function pointers | Microsoft Docs

Marshal Class (System.Runtime.InteropServices) | Microsoft Docs
Marshal.Copy Method (System.Runtime.InteropServices) | Microsoft Docs copy for unmanaged code, also useful for copying across buffers of different type
C# Marshal.Copy 方法代碼示例 - 純淨天空
Buffer Class (System) | Microsoft Docs
Buffer.MemoryCopy Method (System) | Microsoft Docs

IntPtr unmanagedPointer = Marshal.AllocHGlobal(bytes.Length, GCHandleType.Pinned);
Marshal.Copy(bytes, 0, unmanagedPointer, bytes.Length);
// Call unmanaged code with unmanagedPointer
Marshal.FreeHGlobal(unmanagedPointer);

c# - P/Invoke, Pinning, and KeepAlive Best Practices - Stack Overflow
CLR Inside Out - Best Practices For Managed And Native Code Interoperability | Microsoft Docs
Delegate Keep alive

.NET Memory control : Use GCHandle to pin down the objects - DZone
The Truth About Value Types - Fabulous Adventures In Coding - Site Home - MSDN Blogs always pin structure before copying

[StructLayout(LayoutKind.Sequential, Pack = 1)]
struct TcpKeepAliveConfiguration
{
    public byte[] ToByteArray()
    {
      byte[] bytes = new byte[Marshal.SizeOf(typeof(TcpKeepAliveConfiguration))];
      unsafe
      {
        fixed (TcpKeepAliveConfiguration* ptr = &this)
        {
          // now you have pinned "this" and obtained a pointer to it in one step
            Marshal.Copy(ptr, bytes, 0, bytes.Length);
            return bytes;
        }
      }
    }
}

How to use pointers to copy an array of bytes - C# Programming Guide | Microsoft Docs unsafe loop

Unsafe array access and pointer arithmetics in C# - Nicolas Portmann - .NET / Java / Security

c# - Comparing two byte arrays in .NET - Stack Overflow P/Invoke memcmp()
Tech and me: Fast byte array comparison in C# unsafe loop with int32 compare

Garbage Collection

.NET garbage collection | Microsoft Docs
Garbage Collection and C#

maoni, Author at .NET Blog GC topics
GC Handles - .NET Blog

Fundamentals of garbage collection | Microsoft Docs

Fighting Common WPF Memory Leaks with dotMemory | The .NET Tools Blog
5 Techniques to avoid Memory Leaks by Events in C# .NET you should know - Michael's Coding Spot
8 Ways You can Cause Memory Leaks in .NET - Michael's Coding Spot
Find, Fix, and Avoid Memory Leaks in C# .NET: 8 Best Practices - Michael's Coding Spot
Svetoslav Savov's Blog: Memory Leaks in WPF applications
Managing unmanaged objects in C#. Solving a tricky race condition in… | by Mark Jordan | Ingeniously Simple | Medium
Removing Event Handlers using Reflection - CodeProject
Best practices to facilitate garbage collection in .Net | InfoWorld
How to avoid GC pressure in C# and .NET | InfoWorld

Implement a Dispose method | Microsoft Docs
IDisposable Interface (System) | Microsoft Docs
Object.Finalize Method (System) | Microsoft Docs

Everybody thinks about garbage collection the wrong way | The Old New Thing
When does an object become available for garbage collection? | The Old New Thing
When do I need to use GC.KeepAlive? | The Old New Thing

Weak Events in C# - CodeProject

In-depth .NET Memory Profiling - .NET Memory Profiler
Optimizing garbage collection in a high load .NET service | by Max Nalsky | The Startup | Medium
microsoft/perfview: PerfView is a CPU and memory performance-analysis tool

Concurrency

Managed Threading | Microsoft Docs

Asynchronous programming - C# | Microsoft Docs
Async in depth | Microsoft Docs
await anything; | .NET Parallel Programming
C# Async/Await/Task Explained (Deep Dive) - YouTube

Threading in C# - Free E-book
Threading Simplified - Search Result
Concurrent Programming in .NET Core | DotNetCurry
C# Sharding and Multithreading - Deep Dive | DotNetCurry
Asynchronous Producer Consumer Pattern in .NET (C#) | DotNetCurry
Asynchronous Programming in C# using Async Await – Best Practices | DotNetCurry

CancellationTokenSource Class (System.Threading) | Microsoft Docs

How Do I Debug Async Code in Visual Studio? | Visual Studio Blog
Debugging Async Code: Parallel Stacks for Tasks | Visual Studio Blog

Parallel Processing, Concurrency, and Async Programming in .NET | Microsoft Docs
MSDN Magazine: Parallel Computing - It's All About the SynchronizationContext | Microsoft Docs
Write a simple parallel program using Parallel.ForEach | Microsoft Docs

Task Parallel Library (TPL) | Microsoft Learn
Asynchrony with C# and Go

Functional

Functional Programming (F#) for C# Developers | DotNetCurry

File

File Input and Output | C# Intermediate Course

using (var f = MemoryMappedFile.CreateFromFile(fileName, FileMode.Open));
using (var fAccessor = f.CreateViewAccessor());
var fHandle = fAccessor.SafeMemoryMappedViewHandle;
// fHandle.DangerousGetHandle()
// fHandle.ByteLength
static IEnumerable<string> ReadFrom(string file)
{
    string line;
    using (var reader = File.OpenText(file))
    {
        while ((line = reader.ReadLine()) != null)
        {
            yield return line;
        }
    }
}

Serialization

Serialization - .NET | Microsoft Docs
How to serialize and deserialize JSON using C# - .NET | Microsoft Docs
c# - Why does a binary serialization of a float use 55 bytes? - Stack Overflow

Try the new System.Text.Json APIs | .NET Blog
The Battle of C# to JSON Serializers in .NET Core 3 - Michael's Coding Spot
System.text.json VS Newtonsoft.json - Sami C. - Medium
Newtonsoft is the most feature-rich, but converts to UTF16
Utf8Json is the fastest

Logging

From zero to logging with System.Diagnostics in 15 minutes
Trace Class (System.Diagnostics) | Microsoft Docs

ILoggerFactory Interface (Microsoft.Extensions.Logging) | Microsoft Docs
Logging in .NET Core and ASP.NET Core | Microsoft Docs
.NET Logging Basics - The Ultimate Guide To Logging
Fundamentals of Logging in .NET Core

Apache log4net – Apache log4net: Home - Apache log4net

NLog
NLog/NLog: NLog - Advanced and Structured Logging for Various .NET Platforms

NuGet Gallery | Packages matching serilog

Timers

Stopwatch Class (System.Diagnostics) | Microsoft Docs supported by QueryPerformanceCounter
Acquiring high-resolution time stamps - Win32 apps | Microsoft Docs
Under the Hood of Stopwatch – {coding}Sight

Why are the Multimedia Timer APIs (timeSetEvent) not as accurate as I would expect? | Microsoft Docs

High Resolution Clock in C# | manski's blog
Precision and accuracy of DateTime | Microsoft Docs
Why are the Multimedia Timer APIs (timeSetEvent) not as accurate as I would expect? | Microsoft Docs
C# High Resolution Timer | Tek Eye

揭秘 .NET 中的 TimerQueue(上) - 黑洞视界 - 博客园
揭秘 .NET 中的 TimerQueue(下) - 黑洞视界 - 博客园

High resolution timer in C# - Stack Overflow
c# - System.Threading.Timer vs System.Threading.Thread.Sleep resolution - .NET Timer not using system clock resolution - Stack Overflow

Network

Create a REST client using .NET Core | Microsoft Docs

Tips and Tricks

#perfmatters

Discover .NET - Performance is a Feature!
Geting 4x Speedup With .NET Core 3.0 SIMD Intrinsics
New Dynamic Instrumentation Profiling for .NET | Visual Studio Blog

NuGet Gallery | Microsoft.Windows.EventTracing.Processing.All 1.9.2
Documentation - .NET TraceProcessing | Microsoft Docs
Event Tracing - Win32 apps | Microsoft Docs
perfview/TraceEventProgrammersGuide.md at main · microsoft/perfview
perfview/TraceEventLibrary.md at main · microsoft/perfview
perfview/src/TraceEvent/Samples at main · microsoft/perfview

The ‘in’-modifier and the readonly structs in C# | Premier Developer
Ref return values and ref locals (C# Guide) | Microsoft Docs
Performance traps of ref locals and ref returns in C# | Premier Developer

How to use ArrayPool and MemoryPool in C# | InfoWorld
How to use the object pool design pattern in C# | InfoWorld
ArrayPool vs MemoryPool—minimizing allocations in AIS.NET | endjin caveat of MemoryPool<T>'s `IMemoryOwner'

optimization - Inline functions in C#? - Stack Overflow

using System.Runtime.CompilerServices;

class Foo {
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    void InlinedFunction() { }
}

P/Invoke

Native interoperability - .NET | Microsoft Docs
Platform Invoke (P/Invoke) | Microsoft Docs
Type marshaling - .NET | Microsoft Docs

pinvoke.net: the interop wiki!

BenchmarkDotNet

BenchmarkDotNet
Overview | BenchmarkDotNet
How to run your benchmarks | BenchmarkDotNet
How to use console arguments | BenchmarkDotNet

Getting Started with BenchmarkDotNet - codeburst

C binding

Calling Native Functions from Managed Code | Microsoft Docs

Loading Native Libraries in C# - DEV
Nupkg Ergonomics or, The ongoing saga of C# bindings to NNG native library - DEV

Ybeer's .NET Blog: Techniques of calling unmanaged code from .NET and their speed

ASP.NET

ASP.NET documentation | Microsoft Docs
ASP.NET Core application architecture guidance
What is ASP.NET? | .NET
ASP.NET Core 101 - YouTube

Creating Discoverable HTTP APIs with ASP.NET Core 5 Web API | ASP.NET Blog
Open-source HTTP API packages and tools | ASP.NET Blog

Tutorial: Create a Razor Pages web app with ASP.NET Core | Microsoft Docs
Creating your first .NET Core project on Linux - Wolox - Medium

DotVVM | Component-based MVVM framework for ASP.NET
riganti/dotvvm: Open source MVVM framework for Web Apps

Packages

NuGet package manager for C#, however dotnet supports NuGet packages inherently dotnet package and dotnet tool

NuGet Gallery | Home
NuGet documentation | Microsoft Docs
Nuget 101 - YouTube

NuGetPackageExplorer/NuGetPackageExplorer: Create, update and deploy Nuget Packages with a GUI view contents in NuGet package

Nuget caches packages at %userprofile%\.nuget\packages

NuGet Must Haves Packages - NuGet Must Haves Package

benfoster/o9d-guard: Opinionated Guard Extensions for .NET
RestClient.Net 5 – ChristianFindlay.com

What is Paket? supports URL source

Creating Packages

dotnet pack command - .NET Core CLI | Microsoft Docs pack project into NuGet package

Level up your .NET libraries - Ben Foster
Creating and Maintaining .NET Libraries: Lessons Learned
How to publish NuGet symbol packages using the new symbol package format '.snupkg' | Microsoft Docs

CLI

dotnet/command-line-api: Command line parsing, invocation, and rendering of terminal output.
.NET - Parse the Command Line with System.CommandLine | Microsoft Docs
Building your first app with System.CommandLine
Parsing the command line for your application with System.CommandLine – Bruno Sonnino

commandlineparser/commandline: The best C# command line parser that brings standardized *nix getopt style, for .NET. Includes F# support
Command Line Parser on .NET5 | Windows Dev

CommandLineUtils
natemcmaster/CommandLineUtils: Command line parsing and utilities for .NET

spectreconsole/spectre.console: A .NET library that makes it easier to create beautiful console applications.
piraces/ConsoleCoin: Simple console app to track CryptoCurrencies prices

Database

praeclarum/sqlite-net: Simple, powerful, cross-platform SQLite client and ORM for .NET
UPDATED HOWTO: SQLite with Windows 8 apps

Dapper Dapper Tutorial | Dapper Tutorial and Documentation
StackExchange/Dapper: Dapper - a simple object mapper for .Net

Welcome To Learn Dapper | Learn Dapper
How to use the Dapper ORM in C# | InfoWorld
Introduction to Dapper — A micro ORM , a simple Object Mapper for .NET | by Bavanthini Kathiresapillai | Medium
Dapper - King of Micro ORM (C#.NET)

Web server

Open-source HTTP API packages and tools | ASP.NET Blog

Python for .NET

Python for .NET | pythonnet.github.io
pythonnet/pythonnet: Python for .NET is a package that gives Python programmers nearly seamless integration with the .NET Common Language Runtime (CLR) and provides a powerful application scripting tool for .NET developers.

Embedding Python | pythonnet.github.io

C/C++ for .NET

mono/CppSharp: Tools and libraries to glue C/C++ APIs to high-level languages