talira

A modern, open-source programming language

open sourceMITself-hostablefree

C# is Microsoft's cross-platform, general-purpose programming language and the most popular language for .NET. It's strongly and statically typed, based on object-oriented principles with many features from functional programming, and has generics, records, pattern matching, LINQ queries and async and await for asynchronous code. The Roslyn compiler turns C# into common intermediate language, which the .NET runtime compiles to native code just in time and runs with a garbage collector; most of the .NET runtime and libraries are written in C# themselves. Since C# 14 and .NET 10, a single .cs file can run directly with dotnet run. Libraries come from NuGet, and a new version ships every November alongside .NET.

Libraries for C# and .NET

View 40 more

Browse all of them: 51 libraries, 17 frameworks, 127 APIs.

Problems it solves

  • a statically typed language for web APIs, desktop apps and games that runs on Windows, Linux and macOS
  • which language should I use for a large business application with strong tooling and a big library ecosystem
  • write asynchronous server code that reads like synchronous code
  • a garbage-collected language that's still fast for high-throughput services
  • catch type errors at compile time but keep concise code with type inference
  • build Unity games or cross-platform mobile apps in one language
  • run a small script file without setting up a project

Features

  • strong static typing with type inference and generics
  • object-oriented with functional features
  • async and await
  • records and pattern matching
  • compiles to common intermediate language, JIT-compiled by the .NET runtime
  • garbage collection
  • file-based apps run with dotnet run
  • libraries from NuGet

Alternatives

The same job

These do what C# does.

  1. Kotlin Concise. Multiplatform. Fun.
  2. TypeScript JavaScript with static types, compiled to plain JavaScript
  3. OCaml An industrial-strength functional programming language with an emphasis on expressiveness and safety
  4. Go Build simple, secure, scalable systems with Go
  5. F# F# empowers everyone to write succinct, robust and performant code
  6. Java The destination for Java developers

Compare C# with the top 3