Base Class Library (BCL)
The .NET Base Class Library (BCL) provides a comprehensive set of fundamental types and services that form the foundation of your .NET applications. It includes types for collections, I/O, networking, threading, security, and much more.
System Namespace
The root namespace for most .NET types. It contains fundamental classes like Object, String, Exception, and basic data types.
Key Classes and Structs:
| Signature | Description |
|---|---|
class Object |
The ultimate base class of all types in the .NET Framework. |
class String |
Represents text as a sequence of characters. Immutable. |
class Exception |
The base class for all exceptions in the .NET Framework. |
struct DateTime |
Represents an instance of time, typically expressed as a date and time of day. |
struct Guid |
Represents a globally unique identifier (GUID). |
System.Collections Namespace
Provides interfaces and classes that define collections of objects, such as lists, queues, arrays, hash tables, and dictionaries.
Key Interfaces and Classes:
| Signature | Description |
|---|---|
interface IEnumerable |
Supports iteration over a non-generic collection. |
interface ICollection |
Represents a collection of objects of the same type. Inherits from IEnumerable. |
class ArrayList |
Represents a dynamically sized, unsorted list of objects that can be accessed by index. |
System.Collections.Generic Namespace
Provides interfaces and classes that define generic collections, which allow developers to create collections that strongly type the elements the collection contains. This improves type safety and performance.
Key Generic Types:
| Signature | Description |
|---|---|
class List<T> |
Represents a list of objects that can be accessed by index. Strongly typed. |
class Dictionary<TKey, TValue> |
Represents a collection of key/value pairs that are indexed by unique keys. |
interface IEnumerable<out T> |
Supports iteration over a collection of a specified type. |
System.IO Namespace
Contains types that allow reading and writing to files and data streams, as well as types that represent and manipulate file and directory objects.
Key Classes:
| Signature | Description |
|---|---|
class File |
Provides static methods for the creation, copying, deletion, moving, and opening of files. |
class Directory |
Provides static methods for creating, moving, and enumerating through directories and subdirectories. |
abstract class Stream |
Represents an abstract base class for all streams. |
Explore the various namespaces within the Base Class Library to leverage the power of the .NET platform for your application development.