Aller au contenu principal
ProduitsOutils de bureauTASTECADConsultation de plansTASTEFILESGestion de fichiersTASTEFTPTransfert de fichiersTASTESSHEspace de travail à distanceTASTEZIPCompression et extractionOutils pour développeursTASTECODEEnvironnement de développement intégré pour RustTASTESTUDIOEnvironnement intégré de développement et de testTASTEETLIntégration de données (ETL)ServeursTASTEREMOTEServeur de bureau à distanceTASTEGEOServeur géospatialTASTEMAILEspace de travail e-mailCommencerTéléchargementsDocumentationAcheterTous les produits
Marketplace
Actualités
TechActualitésL’actu dev du jourDocs développeursLangages de programmationRustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDartFrameworks front-end webNext.jsReactVue.js · NuxtSvelteKitAngularFrameworks serveurSpring BootDjangoFastAPIASP.NET CoreNestJS · ExpressFrameworks d'applications et de bureauTauriFlutterReact NativeElectronAlgorithmesBases des algorithmesAlgorithmes essentielsAlgorithmes avancésAlgorithmes pratiques
CommunautéProjetsJournaux de développementPromptsProblèmes d’outils d’IAVitrineGuide de la communauté
CollaborerTransfert techniqueRéalisation de site webRéalisation d'application de bureauChaîne de publication et de paiementPartenaire commercialContact
ServicesBureau à distancePaquets d'installation sur mesure
TASTEDEV
Produits

Outils de bureau

TASTECADDes plans complexes, ouverts en toute légèretéTASTEFILESSeulement les fichiers utiles, au plus viteTASTEFTPLe chemin le plus net pour vos fichiersTASTESSHEntre vos serveurs et vous, un lien plus solideTASTEZIPCompresser plus vite, extraire en toute sécurité

Outils pour développeurs

TASTECODEModifier, compiler, déboguer et tester vos apps Rust dans une seule fenêtreTASTESTUDIODe l’édition aux tests à distance et aux corrections IA approuvéesTASTEETLDéplacer les données, les valeurs sous les yeux

Serveurs

TASTEREMOTEUn bureau à distance hébergé sur votre propre serveurTASTEGEOUn serveur géospatial compatible GeoServer, reconstruit en RustTASTEMAILReprenez la maîtrise de vos e-mails

Commencer

TéléchargementsDernières versions de chaque produitDocsUtiliser chaque produitAcheterAbonnements et licences perpétuellesTous les produitsTous les produits en un coup d’œil
Tous les produits
MarketplaceActualités
Tech

Actualités

L’actu dev du jourAnnonces officielles : langages, frameworks, GitHub et IADocs développeursGuides des langages, frameworks et algorithmes

Langages de programmation

RustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDart

Frameworks

Frameworks front-end webNext.jsReactVue.js · NuxtSvelteKitAngular
Frameworks serveurSpring BootDjangoFastAPIASP.NET CoreNestJS · Express
Frameworks d'applications et de bureauTauriFlutterReact NativeElectron

Algorithmes

Bases des algorithmesAnalyse de complexité · Tri · Recherche · Structures de données de base · Arbres et tasAlgorithmes essentielsParcours de graphe · Plus courts chemins et arbres couvrants · Programmation dynamique · Algorithmes gloutons · Diviser pour régner · Backtracking (retour sur trace)Algorithmes avancésAlgorithmes sur les chaînes · Mathématiques et théorie des nombres · Manipulation de bits · Arbres de segments · Union-FindAlgorithmes pratiquesStratégie pour les entretiens de codage · Cache LRU · Limitation de débit · Hachage cohérent
Toute la documentation de développement
Communauté
ProjetsDécouvrir les créateurs et leurs travauxJournaux de développementDécisions et enseignementsPromptsInstructions réutilisablesProblèmes d’outils d’IAProblèmes et contournements de Claude, Codex, GeminiVitrineRéalisations terminéesGuide de la communautéConstruire en toute transparence
Collaborer
Transfert techniqueApplications natives en Rust et eguiRéalisation de site web10 langues, comptes, documentation et téléchargementsRéalisation d'application de bureauRust et egui, sans WebViewChaîne de publication et de paiementSignature, MSI, deb, rpm, AppImage, empreintesPartenaire commercialRecommandez-nous, touchez 30 %ContactDéveloppement, partenariats, investissement
Services
Bureau à distanceAccédez à votre ordinateur depuis le navigateurPaquets d'installation sur mesureSeulement l'utile, réglages préchargés
Acheter
FR
한국어EnglishDeutschEspañolFrançaisItalianoPortuguês (Brasil)日本語简体中文繁體中文
Se connecter
Se connecter
TASTEDEV

Des petits outils à un meilleur développement.

support@tastedev.netSoutenir TASTEDEV
ProduitsGamme de produitsAcheterDocsTéléchargementsMarketplaceAssistance
CommunautéProjetsJournaux de développementPromptsProblèmes d’outils d’IAVitrine
RèglesPolitique de confidentialitéConditions d'utilisationConditions d’abonnementRemboursementRègles de la communauté
CompteSe connecterS'inscrire
Visiteurs
Aujourd’hui
012345678901234567890123456789012345678901234567890123456789
Hier
012345678901234567890123456789012345678901234567890123456789
Vues au total
0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
Société
GXSOFT
Représentant
CHOI YOUNG GU
Numéro d’enregistrement
853-44-00368
Adresse
9F V24, 351 Gyeongin-ro, Michuhol-gu, Incheon, Republic of Korea
Téléphone
+82-10-4404-1523
E-mail
whitecalvin@tastedev.net
Responsable de la confidentialité
CHOI YOUNG GU

© 2026 TASTEDEVLes informations produit s'appuient sur des sources de développement vérifiées.Publié · en amélioration

Documentation C#
C#
Getting Started with CSyntax BasicsTypes and DataProjects and PackagesErrors and TestingKey Concepts: LINQ, Delegates, and Async
Discussions

Guide C# · 1/6

Getting Started with C

Ce chapitre n'est disponible qu'en anglais pour le moment.

C# is a statically typed, object-oriented language from Microsoft that runs on .NET, an open-source, cross-platform runtime. The same language and toolchain cover command-line tools, web APIs, desktop apps, Unity games, and cloud services. In this chapter you will install the .NET SDK, create and run a first project, look inside the project file, and set up an editor.

Installing the .NET SDK

To build C# code you need the .NET SDK. It bundles the compiler, the dotnet command-line tool, the base class libraries, and the runtime. Machines that only run apps can get by with the runtime alone, but your development machine needs the full SDK.

  • Download installers for Windows, macOS, and Linux from the .NET download page. Unless you have a reason not to, pick the current long-term support (LTS) release.
  • Package managers work too: winget on Windows, Homebrew on macOS, and your distribution's package manager or Microsoft's package feed on Linux.
  • Installing Visual Studio with the .NET development workload also installs the SDK.

Open a fresh terminal afterwards and check the installation:

dotnet --version
dotnet --list-sdks
dotnet --info

dotnet --version prints the SDK currently in use, and dotnet --list-sdks shows every installed SDK. Multiple SDKs can live side by side; each project declares which framework version it targets.

Your First Project

dotnet new scaffolds projects from templates. The console app template is called console:

dotnet new console -o HelloApp
cd HelloApp
dotnet run

The -o HelloApp option creates a HelloApp folder and puts the project inside it. You get two files, HelloApp.csproj and Program.cs, and dotnet run prints Hello, World!. The whole program is a single line:

// Program.cs
Console.WriteLine("Hello, World!");

There is no class and no Main method because of top-level statements: the compiler generates the entry point around the statements in this file for you. Command-line arguments arrive in a predefined args variable:

if (args.Length == 0)
{
    Console.WriteLine("Usage: dotnet run -- <name>");
    return;
}

var name = args[0];
Console.WriteLine($"Hello, {name}! Today is {DateTime.Now:yyyy-MM-dd}.");

Run it with dotnet run -- Alice. Everything after -- is passed to your program; options before it belong to dotnet run itself.

Des questions sur ce chapitre ?
Chapitre suivantSyntax Basics

The Project File (.csproj)

The .csproj file is an MSBuild XML document describing what to build and how. The template generates something like this:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net10.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
  </PropertyGroup>

</Project>
SettingWhat it does
Sdk="Microsoft.NET.Sdk"Uses the standard build rules for .NET projects. Web projects use Microsoft.NET.Sdk.Web.
OutputTypeExe produces an executable; leave it out to build a class library (.dll).
TargetFrameworkThe .NET version you target. The template fills in a value that matches your SDK.
ImplicitUsingsAutomatically imports common namespaces such as System, System.IO, and System.Linq.
NullableTurns on nullable reference type analysis (covered in chapter 3).

SDK-style projects include every .cs file under the project folder automatically, so adding a new source file never requires editing the project file.

Building and Running

These are the commands you will use most often:

dotnet build                 # build the Debug configuration
dotnet build -c Release      # build the Release configuration
dotnet run                   # build, then run
dotnet watch                 # rebuild and rerun whenever files change
dotnet clean                 # remove build outputs

Compiled output lands in bin/Debug/<target framework>/, and intermediate files go to obj/. Both folders can be regenerated at any time, so keep them out of source control. Running dotnet new gitignore drops a .NET-flavored .gitignore into the current folder.

Setting Up an Editor

C# has excellent tooling. Any of the following gives you completion, refactoring, and debugging out of the box:

  • Visual Studio: a full IDE for Windows with the richest debugger and profiler.
  • Visual Studio Code: a lightweight editor; add the C# Dev Kit extension for a solution explorer, test explorer, and debugger.
  • JetBrains Rider: a cross-platform IDE that behaves the same on Windows, macOS, and Linux.

Whatever you choose, dotnet format keeps code style consistent. Commit an .editorconfig at the repository root so indentation, naming rules, and warning levels are shared by the whole team.

Summary

  • C# development requires the .NET SDK; verify it with dotnet --version.
  • Create a project with dotnet new console and run it with dotnet run.
  • Top-level statements in Program.cs form the entry point, and arguments come in through args.
  • The .csproj file is an MSBuild document that sets the target framework, output type, and compiler options.
  • Pick Visual Studio, VS Code with C# Dev Kit, or Rider, and use dotnet format to keep style consistent.

0 commentaire

Meilleurs commentairesPlus récents d'abord

Se connecter · Connectez-vous pour laisser un commentaire.