.NET Framework Core Documentation

Introduction to .NET Framework Core

The .NET Framework Core represents a significant evolution of the .NET platform, designed for flexibility, modularity, and cross-platform compatibility. It is a high-performance, open-source framework that enables you to build a wide range of applications, from cloud-native services to desktop applications.

Unlike the traditional .NET Framework, .NET Core is not tied to Windows and can run on Windows, macOS, and Linux. This section provides an overview of its core principles, architecture, and key features.

Key Goals of .NET Core

Architectural Overview

.NET Core's architecture is built around a set of foundational components:

Core Concepts

Understanding the following concepts is crucial for effective .NET Core development:

A Simple "Hello, World!" Example

Here's a basic example demonstrating how to create a console application in .NET Core:


using System;

public class Program
{
    public static void Main(string[] args)
    {
        Console.WriteLine("Hello, .NET Core World!");
    }
}
                

To run this, you would typically use the .NET CLI:


dotnet new console -o HelloWorldApp
cd HelloWorldApp
dotnet run
                

Runtime Environment

The .NET Core runtime is the foundation upon which your applications execute. It's a sophisticated system responsible for managing code execution, memory, and other critical aspects of application behavior.

Common Language Runtime (CLR)

The CLR is the execution engine for .NET applications. Key features include:

Base Class Library (BCL)

The BCL provides a rich set of fundamental classes and types that are essential for .NET development. This includes data structures, file I/O, networking, cryptography, and much more.