Skip to main content Skip to navigation

Documentation

Everything you need to build irresistible applications

Building with C#

Create modern applications across web, mobile, desktop, and cloud with Microsoft's versatile language

Why Choose C#?

🌐 Truly Cross-Platform

Build for Windows, Linux, macOS, iOS, Android, and the web from a single codebase.

🚀 Modern Language

Cutting-edge features like pattern matching, nullable types, and async streams.

🎮 Unity Game Engine

The preferred language for Unity, powering millions of games worldwide.

☁️ Cloud First

Deep Azure integration and excellent support for microservices and serverless.

What Can You Build?

Web Applications

Modern web framework, cross-platform, high performance

Frameworks:

ASP.NET CoreBlazorSignalRMinimal APIs

Examples:

  • Enterprise web apps
  • REST APIs
  • Real-time apps
  • SPA applications

Game Development

Unity ecosystem, rapid prototyping, cross-platform deployment

Frameworks:

UnityMonoGameGodotStride

Examples:

  • Mobile games
  • PC games
  • VR/AR experiences
  • Simulations

Desktop Applications

Rich UI frameworks, Windows integration, cross-platform options

Frameworks:

WPFWinFormsMAUIAvalonia

Examples:

  • Business tools
  • Media applications
  • Development tools
  • Utilities

Cloud & Microservices

Azure integration, containerization, scalable architecture

Frameworks:

.NET 8Azure FunctionsService FabricgRPC

Examples:

  • Serverless functions
  • Microservices
  • Cloud APIs
  • Event processing

Natural Language Examples

Describe your C# project in plain English:

"Create a C# web API with authentication, Entity Framework, and Swagger docs"

RESTful API with JWT auth and auto-generated documentation

"Build a C# Blazor app for project management with real-time updates"

Interactive web app with SignalR for live collaboration

"Design a C# Unity game with multiplayer support and leaderboards"

Cross-platform game with networking and cloud services

C# Best Practices

Modern C#

  • Use nullable reference types
  • Leverage pattern matching
  • Async/await everywhere
  • Record types for DTOs

Architecture

  • Follow SOLID principles
  • Use dependency injection
  • Implement repository pattern
  • Clean architecture layers

Performance

  • Use Span<T> for memory
  • Avoid boxing/unboxing
  • Pool expensive objects
  • Profile with BenchmarkDotNet

Testing

  • Unit test with xUnit
  • Mock with Moq or NSubstitute
  • Integration test APIs
  • Use test data builders

Quick Start Templates

🌐 Web API

ASP.NET Core API with authentication and database

"Create a C# API for e-commerce with payments"

⚡ Blazor App

Interactive web UI with C# instead of JavaScript

"Build a C# Blazor dashboard with charts"

🎮 Unity Game

Cross-platform game with physics and animations

"Design a C# Unity puzzle game"

🖥️ Desktop App

Modern desktop application with rich UI

"Create a C# WPF media player app"

Pro Tips

🆕 Use .NET 8

Always use the latest LTS version for performance and security improvements

📦 NuGet Central

Use Central Package Management for consistent versions across projects

🔥 Hot Reload

Use hot reload during development for instant feedback on changes

🛡️ Nullable Types

Enable nullable reference types to catch null reference exceptions at compile time