DEV Community

Cover image for Getting Started with C# and .NET Development: A Beginner's Guide
oteri
oteri

Posted on • Edited on

Getting Started with C# and .NET Development: A Beginner's Guide

It is interesting to begin learning C# and .NET after never considering coming close to it as a software engineer. From my standpoint, I will share my thoughts from a series of tutorials.

I am delighted to embark on this journey from zero to hero to master the concepts and become proficient in using this tool to build outstanding applications.

What is C#?

C# is a statically typed programming language that provides type safety, meaning the compiler helps you prevent bugs before you even run your program or app.

According to research on the top 10 most in-demand programming languages in 2024, C# ranks 4 behind Python, JavaScript, and Java.

What is .NET?

.NET is an open-source developer platform created by Microsoft for building many different types of cross-platform applications. One major driving force of .NET is that it supports three programming languages, C#, F#, and Visual Basic (VB) .NET.

Some use cases and why you should learn C# and .NET development include the following:

  • Desktop applications
  • Mobile apps
  • Web development
  • Game development
  • Internet of Things (IoT)
  • Machine Learning
  • Cloud-First development
  • Console applications

Setup and Installation

You only need a text editor like VS Code, Cursor, or any other you are comfortable using for setup. Some of the extensions that are worthy to use are:

After the necessary installation, run the following command in your terminal to check for the presence of the SDKs and the runtimes:

dotnet --list-sdks

dotnet --list-runtimes
Enter fullscreen mode Exit fullscreen mode

Creating your first C# Console Application

Create a new directory to contain the boilerplate code and run this command within the directory:

dotnet new console
Enter fullscreen mode Exit fullscreen mode

You should have something similar to this:

.
├── Program.cs
├── obj
│   ├── project.assets.json
│   ├── project.nuget.cache
│   ├── try-dotnet.csproj.nuget.dgspec.json
│   ├── try-dotnet.csproj.nuget.g.props
│   └── try-dotnet.csproj.nuget.g.targets
└── try-dotnet.csproj
Enter fullscreen mode Exit fullscreen mode

To test and run the program, use this command in your terminal:

dotnet run
Enter fullscreen mode Exit fullscreen mode

console app

Top comments (0)