Welcome to .NET
.NET is a free, cross-platform, open-source developer platform for building many different types of applications. With .NET, you can create console applications, web applications, cloud services, mobile apps, desktop apps, and much more. This documentation will guide you through the core concepts and provide the resources you need to start building your own .NET applications.
What is .NET?
.NET is a versatile framework that includes everything you need to build and deploy applications. It's composed of several key parts:
- The .NET Runtime: This is the foundation that executes your applications. It includes the Common Language Runtime (CLR) and the .NET Base Class Library (BCL).
- The .NET SDK: This is a collection of tools for building and publishing applications. It includes compilers, debuggers, and other essential utilities.
- The .NET CLI: A command-line interface that allows you to create, build, run, and publish .NET applications from your terminal.
Key Features of .NET
Cross-Platform
Develop and run your applications on Windows, macOS, and Linux.
Open-Source
Contribute to and benefit from a vibrant community-driven platform.
High Performance
Built for speed and efficiency, .NET delivers excellent runtime performance.
Versatile
Build web apps, mobile backends, microservices, cloud services, and more.
Modern Language Support
Leverage powerful languages like C#, F#, and Visual Basic.
Rich Ecosystem
Access a vast collection of libraries and tools for every development need.
Your First .NET Application
Let's create a simple "Hello, World!" console application using the .NET CLI.
-
Create a new project:
Open your terminal or command prompt and navigate to the directory where you want to create your project.
Then, run the following command:
dotnet new console -o MyFirstApp
MyFirstApp
and generates the necessary files for a console application. -
Navigate to the project directory:
cd MyFirstApp
-
Run the application:
dotnet run
You should see the output: Hello, World!