Base Class Library in .NET

The development of the .NET Framework has also had two parts. The .NET Framework 1.0 and 1.1 come under the first part, while completely removing their shortcomings, version 2.0 of the .NET Framework was a completely changed version, and this version was called the Standard Base Version of the .NET Framework. Other .NET Framework Versions have been developed using this.

After .NET Framework 2.0, FCL, i.e., Framework Class Library of .NET Framework, has been specially extended, and new classes have been defined in new namespaces to easily fulfill different types of requirements.

While no change has been made in the root of C# and other .NET Supported Languages ​​to meet these new types of requirements. However, in every updated version, some new concepts have been appended to these programming languages, which we will know in detail during this book.

Since the .NET Framework 2.0 was able to become exactly the platform that Microsoft wanted, the .NET Framework 2.0 version has been used as the basis for the .NET Platform. Therefore, we will first understand the various features provided by the .NET Framework 2.0.

Because. NET Framework 2.0, more attention has been given by Microsoft to add new Namespaces and Classes to it while developing FCL to meet new types of requirements.

So .NET version 2.0, which was launched in 2005, was the only really perfect .NET platform. However, till the present time, .NET Framework 4.5 Version has arrived, and various features of .NET up to 4.5 Version can be better understood on the basis of their versions as shown below:

As we can see in this picture that .NET Framework 2.0 has a layer of “Base Class Library” just above the CLR (Common Language Runtime). In this layer, Microsoft has defined those base classes, which are also needed by any simple .NET application.

The Base Class Library of .NET Framework 2.0 has been modified many times till the present time, and new namespaces are being appended with each new .NET Framework version from time to time to meet the new requirements.

Actually, BCL is a part of FCL, while FCL is a huge library of classes provided by Microsoft to meet different types of needs. But BCL represents only those classes that are generally needed by almost all types of .NET applications, whereas other classes defined in FCL are not needed in all types of applications.

Therefore, the classes which are compulsorily required by all .NET applications, those classes are referred by the BCL, while the classes which are required to fulfill the special requirements are kept under FCL.

Very few changes are made to the BCL classes. However, new classes have been added to the BCL from time to time in different .NET versions to meet the different needs because these appended classes are related to providing a new type of Functionality to .NET Supported Programming Languages.

BCL – The Base Class Library in .NET

The namespaces that have been included in the Base Class Library till the latest version of .NET are as follows, while in the coming .NET versions, more new namespaces can be appended as per the need:

System Namespace

This namespace contains classes related to Primary Data Types such as Int32, Double, String, Boolean, etc. That is, the core needs of any .NET application are fulfilled by the classes of this namespace. Attributes, Exceptions, Arrays, Math Functions, DateTime, and Console Environment Related Classes are part of this namespace.

System.Collection Namespace

This namespace has classes related to Convenient Container and Collection Types like Lists, Sets, Dictionaries, Queues, Stacks, Hash Tables, Generics, etc.

System.Diagnostics Namespace

This namespace has classes related to various types of System Services Logging, Performance Counter, Tracing, and Interaction with System Processes.

System.Globalization Namespace

This namespace contains classes related to making a .NET application a Globalize Application.

System.IO Namespace

In this namespace, there are classes related to Input, Output, Streams, Files, etc. By using these classes, we get the ability to read data from devices like the keyboard or disk in the current application and write data to output devices like monitors or disk. Classes of this namespace provide the facility to establish the connection of our .NET application with our file system. 

System.Net Namespace

This namespace has classes related to networking, which support various types of Well-Known Protocols such as TCP, UDP, FTP, SMTP, POP, and HTTP, etc. As well as Protocols such as SSL to provide Secure Communication. Classes related to doing are in this namespace.

System.Reflection Namespace

This namespace contains classes related to Runtime Inspection of IL or MSIL Managed Codes. This namespace provides such classes, which can be used to get the object view of a type, i.e., Class, Methods, and Fields, and to dynamically create and invoke the types.

System.Runtime Namespace

This namespace contains classes related to controlling the behavior of an assembly being run on the CLR. Also, classes related to achieving Interoperability with COM or other Native Codes, creating Distributed Applications, and Serializing Objects into SOAP or Binary are in this namespace.

System.Security Namespace

In this namespace, there are classes related to the Security-Related Functionality of .NET Application. Classes related to setting up Cryptography and Application Based Policy and Permissions are under this namespace.

System.ServiceModel Namespace

In this namespace, there are classes of Service-Oriented Programming related to WCF API.

System.Text Namespace

This namespace has classes related to Text Manipulation, which work to handle various types of Encoding Schemes and Regular Expressions as well as allow for manipulating Strings in different ways.

System.Threading Namespace

There are classes related to Multi-Threaded Programming in this namespace.

System.XML Namespace

This namespace contains classes related to XML Manipulation, which includes Schema and Transformation APIs as well as LINQ Support. That is, if we want to use LINQ in our .NET application or want to do XML manipulation, then we get the services related to them from this namespace.

These are the base classes of the .NET Framework, which are specified by ECMA as Standard Base Classes. But apart from these classes, there are also some other classes, which Microsoft has added to the base class library of the .NET Framework with the launch of various .NET versions, although these classes are not included in the standard specified by ECMA and Microsoft has not even presented these classes to ECMA to be standardized by ECMA.

That is, the new classes that Microsoft is adding to this BCL in the new versions of the .NET Framework do not feel the need to standardize them because the .NET Framework is basically useful only for the Windows Operating System and the Windows Operating System. It is a property of Microsoft itself.

Read also: Assembly in C#

Leave a Comment