> Chapter 1 - Introduction C# and .NET 6 - 1 (LTS,CLS,CTS,BCL)

AUTHOR: PID-1
TIMESTAMP: 2026-05-31 21:42:05
Microsoft's .NET platform and the C# programming language were formally introduced circa 2002. (2000 : .NET has been announced and 2002 .NET and C# officialy has been released.). The .NET platform enables a large number of programming languages including (C#, VB.NET, and F#) to interact with each other. In 2016, Microsoft officialy launched .NET core. Like .NET, .NET core allows languages to interop with each other. More importantly, this new framework is no longer limited to running on Windows OS but can also run on iOS, and Linux, and be developed on MacOS and Linux. • Microsoft launched C# 10 and .NET 6 on November 8,2021. C# 10 is tied to a specific version of the framework and will run only on .NET 6 and above.

Understanding the .NET Support Lifecycle

LTS (Long-Term Support) releases are major releases that will be supported for an extended period of time. They will only receive critical and/or nonbreaking fixes throughout their life span. Prior to end-of-life LTS versions will be changed to the designation of maintanence. LTS releases with .NET will be supported for the following time frames, whichever is longer. • 3 years after initial release • One year of maintenance support after subsequent LTS release. Microsoft has decided to name Short-Term support releases as Current, which are interval releases between the major LTS releases. They are supported for 6 months after a subsequent Current or LTS release. https://dotnet.microsoft.com/platform/support-policy/dotnet-core

Previewing the Building Blocks of the .NET Platform

.NET can be understood as a runtime environment and a comprehensive base class library. The runtime layer contains the set of minimal implementations that are tied specifically to a platform (Windows, iOS, Linux) and architecture (x86,x64,ARM), as well as all of the base types for .NET. Another building block of the .NET Platform is CTS (Common Type System). The CTS specification fully describes all possible data types and all programming constructs supported by the runtime, specifies how these entries can interact with each other, and details how they are represented in the .NET metadata format. For example; VB.NET Code Dim number As Integer = 42 C#

int number = 42;  
In C#, "int" is equivalent to Integer in VB.NET. CTS ensures both are represented as System.Int32. The CLS (Common Language Specification), or CLS, is a related specification that defines a subset of common type and programming constructs that all .NET programming languages can agree on. Thus, if you build .NET types that expose only CLS-compliant features, you can rest assured that all .NET languages can consume them.

public class Car 
{  
    // Genel yöntemler büyük/küçük harf duyarlı olmamalıdır  
    public void RunCar() { }  
 
    // This can not be appropriate for CLS 
    // public void arabayicalistir() { }  
 
    // Yalnızca CLS uyumlu türleri kullanın  
    public int Sum(int a, int b)   
    {  
        return a + b;  
    }  
 
    // This can not be appropriate for CLS  because uint is not assiociated with CLS
    // public uint Extract(uint a, uint b)  
    // {  
    //     return a - b;  
    // }  
}  
Note : To ensure your code is CLS-compliant, you can use the [assembly: CLSCompliant(true)] attribute at the beginning of your code file.

The Role of the Base Class Libraries

The .NET Platform also provides a set of base class libraries (BCLs) that are available to all .NET programming languages. Not only does this base class library encapsulate various primitives such as threads, file input/output (I/O), graphical rendering systems, and interaction with various external hardware devices, but it also provides support for a number of services required by most real-world applications. The base class libraries define types that can be used to build any type of software application and for components of the application to interact with each other. cts cls .net

What C# Brings to the Table

C# is a programming language whose core syntax looks very similar to the syntax of Java. However, calling C# a clone Java is inaccurate. In reality, C# and Java are members of the C family of programming languages (C,Objective-C,C++) and, therefore, share a similar syntax. • Automatic memory management through garbage collection. Given this, C# does not support delete keyword. • Formal syntactic constructs for classes, interfaces, structures, enumeration, and delegates. • Support for attribute-based programming. This brand of development allows you to annotate types and their members to further qualify their behavior. For example, if you mark a method with the [Obsolete] attribute, programmers will see your custom warning message print out if they attempt to make use of the decorated member.

Managed and Unmanaged Code

It is important to note that the C# language can be used to build only software that is hosted under the .NET runtime (you could never use C# to build a native COM server or an unmanaged C/C++ style application). Officialy speaking, the term used to describe the code targeting the .NET runtime is managed code. The binary unit that contains the managed code is termed assembly. Conversly, code that can not be directly hosted by the .NET runtime is termed unmanaged code.
<< RETURN_TO_ROOT