Syntax

C# Run a Project Syntax

In C#, run a project: creates and runs a .NET console app — dotnet new console dotnet run

Quick Answer

Syntax
dotnet new console dotnet run
C#Syntax

Run a Project

Code example
dotnet new console dotnet run

Creates and runs a .NET console app.

Learn More

How to run a project in C#

  1. Open your C# file or editor.
  2. Copy the example, then replace its sample names and values for your code.

C# Run a Project Syntax

Use dotnet new console dotnet run.

Related Syntax References

Frequently asked questions

What is the C# syntax for run a project?

Use this pattern: dotnet new console dotnet run

Can I copy this C# code example?

Yes. Use Copy code and adapt the example to your program.

Is this C# syntax different on Mac or Windows?

No. The language syntax is the same across operating systems.

Official source · How we verify