C# Setting up Development Environment
Objectives
- Setting up development environment
- Creating your first C# program
How to Setting up a development environment
- Install .NET SDK
- Visit the official .NET website Here and download the .NET SDK for your operating system (Windows, macOS, or Linux).
- Follow the installation instructions provided for your specific operating system.
- Integrated with Development Environment (IDE) like(Visual Studio or Visual Studio Code)
- Visual Studio: Microsoft's official IDE for .NET development, available for Windows and macOS. Download and install Visual Studio Community edition Here
- Visual Studio Code: A lightweight, cross-platform code editor with built-in support for C# development. Download and install Visual Studio Code Here and install the C# extension.
- Create a C# Project
- Open your chosen IDE (Visual Studio or Visual Studio Code).
- Create a new C# project. In Visual Studio, you can select "File" -> "New" -> "Project", then choose a project template (e.g., Console Application, ASP.NET Core Web Application).
- In Visual Studio Code, you can use the command palette (Ctrl+Shift+P) to run commands like "C#:
Creating your first C# program
Creating your first C# program is a simple process.
using System;
class Hello
{
static void Main()
{
// This line prints "Hello, World"
Console.WriteLine("Hello, World");
}
}