![Standard Libraries (CLI)](https://upload.wikimedia.org/wikipedia/commons/f/f5/Standard_Libraries_%28CLI%29.png)
The Standard Libraries is a set of libraries included in the
Common Language Infrastructure (CLI) in order to encapsulate many common functions, such as file reading and writing,
XML
Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable ...
document manipulation,
exception handling
In computing and computer programming, exception handling is the process of responding to the occurrence of ''exceptions'' – anomalous or exceptional conditions requiring special processing – during the execution of a program. In general, an ...
, application
globalization
Globalization, or globalisation (Commonwealth English; see spelling differences), is the process of interaction and integration among people, companies, and governments worldwide. The term ''globalization'' first appeared in the early 20t ...
, network communication,
threading, and
reflection Reflection or reflexion may refer to:
Science and technology
* Reflection (physics), a common wave phenomenon
** Specular reflection, reflection from a smooth surface
*** Mirror image, a reflection in a mirror or in water
** Signal reflection, in ...
, which makes the programmer's job easier. It is much larger in scope than standard libraries for most other languages, including
C++
C++ (pronounced "C plus plus") is a high-level general-purpose programming language created by Danish computer scientist Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significan ...
, and is comparable in scope and coverage to the
standard libraries of Java.
The Standard Libraries are the Base Class Library (BCL), Runtime Infrastructure Library (both part of the kernel profile), Network Library, Reflection Library, XML Library (which with the first two listed libraries form the compact profile), Extended Array Library, Parallel Library, Floating Point Library and Vararg Library.
The
Framework Class Library
The Framework Class Library (FCL) is a component of Microsoft's .NET Framework, the first implementation of the Common Language Infrastructure (CLI). In much the same way as Common Language Runtime (CLR) implements the CLI Virtual Execution Sy ...
(FCL) is the origin of the Standard Libraries as the .NET Framework, which includes the FCL, is the first implementation of the CLI.
Profiles
The main standard libraries are organized into two Standard Profiles, the Kernel Profile, and the Compact Profile. The following standard libraries do not belong to any profile: the Extended Array Library, the Extended Numerics Library, the Parallel Library and the Vararg Library.
Kernel Profile
The Kernel Profile is a subset of the Compact Profile. The Kernel Profile contains the Base Class Library (BCL) and Runtime Infrastructure Library.
Compact Profile
The Compact Profile contains those libraries in the Kernel Profile as well as the Network Library, the Reflection Library and the XML Library.
Libraries
Base Class Library
The Base Class Library is a simple runtime library for modern programming languages. It serves as the Standard for the runtime library for the language C# as well as one of the CLI Standard Libraries. It provides types to represent the built-in data types of the CLI, simple file access, custom attributes, security attributes, string manipulation, formatting, streams, collections, among other things. It defines types in the following namespaces:
;System: Defines the Object class which all
reference type In computer programming, data types can be divided into two categories: value types (or by-value types) and reference types (or by-reference types). Value types are completely represented by their meaning, while reference types are references to ano ...
objects derive from (including value-type objects) and the ValueType class which all
value type In computer programming, data types can be divided into two categories: value types (or by-value types) and reference types (or by-reference types). Value types are completely represented by their meaning, while reference types are references to ano ...
objects derive from. It also defines the base data types like
integers
An integer is the number zero (), a positive natural number (, , , etc.) or a negative integer with a minus sign ( −1, −2, −3, etc.). The negative numbers are the additive inverses of the corresponding positive numbers. In the language ...
,
floating point numbers
In computing, floating-point arithmetic (FP) is arithmetic that represents real numbers approximately, using an integer with a fixed precision, called the significand, scaled by an integer exponent of a fixed base. For example, 12.345 can be r ...
,
character
Character or Characters may refer to:
Arts, entertainment, and media Literature
* ''Character'' (novel), a 1936 Dutch novel by Ferdinand Bordewijk
* ''Characters'' (Theophrastus), a classical Greek set of character sketches attributed to The ...
,
strings
String or strings may refer to:
*String (structure), a long flexible structure made from threads twisted together, which is used to tie, bind, or hang other objects
Arts, entertainment, and media Films
* ''Strings'' (1991 film), a Canadian anim ...
,
Boolean,
enumeration
An enumeration is a complete, ordered listing of all the items in a collection. The term is commonly used in mathematics and computer science to refer to a listing of all of the elements of a set. The precise requirements for an enumeration (fo ...
and more. Support for the environment and platform and a
command-line interface
A command-line interpreter or command-line processor uses a command-line interface (CLI) to receive commands from a user in the form of lines of text. This provides a means of setting parameters for the environment, invoking executables and pro ...
is provided along with base classes for
exceptions and
attributes
Attribute may refer to:
* Attribute (philosophy), an extrinsic property of an object
* Attribute (research), a characteristic of an object
* Grammatical modifier, in natural languages
* Attribute (computing), a specification that defines a prope ...
. It defines
array
An array is a systematic arrangement of similar objects, usually in rows and columns.
Things called an array include:
{{TOC right
Music
* In twelve-tone and serial composition, the presentation of simultaneous twelve-tone sets such that the ...
s and
delegate
Delegate or delegates may refer to:
* Delegate, New South Wales, a town in Australia
* Delegate (CLI), a computer programming technique
* Delegate (American politics), a representative in any of various political organizations
* Delegate (Unit ...
s, mathematical functions and many other types.
;SystemCollections: Defines many common
container types used in programming, such as
dictionaries
A dictionary is a listing of lexemes from the lexicon of one or more specific languages, often arranged alphabetically (or by radical and stroke for ideographic languages), which may include information on definitions, usage, etymologies, p ...
,
hashtables,
lists
A ''list'' is any set of items in a row. List or lists may also refer to:
People
* List (surname)
Organizations
* List College, an undergraduate division of the Jewish Theological Seminary of America
* SC Germania List, German rugby unio ...
,
queues and
stacks.
;SystemCollectionsGeneric: Defines
generic types of the container types in the SystemCollections namespace.
;SystemDiagnostics: Defines types that provide the ability to diagnose applications. It includes
event logging
In software engineering, tracing involves a specialized use of logging to record information about a program's execution. This information is typically used by programmers for debugging purposes, and additionally, depending on the type and deta ...
, performance counters,
tracing
Tracing may refer to:
Computer graphics
* Image tracing, digital image processing to convert raster graphics into vector graphics
* Path tracing, a method of rendering images of three-dimensional scenes such that the global illumination is faithf ...
and interaction with system processes.
;SystemGlobalization: Defines types that define culture-related information, including language, country/region, calendars in use, format patterns for dates, currency and numbers and sort order for strings.
;SystemIO: Defines type that enable reading from and writing to different
streams
A stream is a continuous body of water, body of surface water Current (stream), flowing within the stream bed, bed and bank (geography), banks of a channel (geography), channel. Depending on its location or certain characteristics, a stream ...
, such as files or other
data stream
In connection-oriented communication, a data stream is the transmission of a sequence of digitally encoded coherent signals to convey information. Typically, the transmitted symbols are grouped into a series of packets.
Data streaming has b ...
s. Also provides a connection to the
file system
In computing, file system or filesystem (often abbreviated to fs) is a method and data structure that the operating system uses to control how data is stored and retrieved. Without a file system, data placed in a storage medium would be one larg ...
.
;SystemSecurity: Defines types that represent the security system and permissions.
;SystemSecurityPermissions: Defines types that control access to operations and resources based on policy.
;SystemText: Defines types that support various
character encoding
Character encoding is the process of assigning numbers to Graphics, graphical character (computing), characters, especially the written characters of Language, human language, allowing them to be Data storage, stored, Data communication, transmi ...
s,
regular expression
A regular expression (shortened as regex or regexp; sometimes referred to as rational expression) is a sequence of characters that specifies a search pattern in text. Usually such patterns are used by string-searching algorithms for "find" or ...
s and a more efficient mechanism for manipulating strings.
;SystemThreading: Defines types that enable
multithreaded programming.
Runtime Infrastructure Library
The Runtime Infrastructure Library provides the services needed by a compiler to target the CLI and the facilities needed to dynamically load types from a stream in a specified file format. It defines types in the following namespaces:
;System: Defines types for the
application domain
An application domain is a mechanism (similar to a process in an operating system) used within the Common Language Infrastructure (CLI) to isolate executed software applications from one another so that they do not affect each other. Each applicat ...
,
pointers
Pointer may refer to:
Places
* Pointer, Kentucky
* Pointers, New Jersey
* Pointers Airport, Wasco County, Oregon, United States
* The Pointers, a pair of rocks off Antarctica
People with the name
* Pointer (surname), a surname (including a lis ...
,
handles
A handle is a part of, or attachment to, an object that allows it to be grasped and manipulated by hand. The design of each type of handle involves substantial ergonomic issues, even where these are dealt with intuitively or by following t ...
and more.
;SystemReflection: Defines types that provide a managed view of loaded types, methods and fields, and that can dynamically create and invoke types. These types are relevant to the
program runtime.
;SystemRuntimeCompilerServices: Defines types that provide functionality for compiler writers who use managed code to specify
attributes
Attribute may refer to:
* Attribute (philosophy), an extrinsic property of an object
* Attribute (research), a characteristic of an object
* Grammatical modifier, in natural languages
* Attribute (computing), a specification that defines a prope ...
in
metadata
Metadata is "data that provides information about other data", but not the content of the data, such as the text of a message or the image itself. There are many distinct types of metadata, including:
* Descriptive metadata – the descriptive ...
that affect the run-time behavior of the
Virtual Execution System
The Virtual Execution System (VES) is a run-time system of the Common Language Infrastructure CLI which provides an environment for executing managed code. It provides direct support for a set of built-in data types, defines a hypothetical mach ...
.
;SystemRuntimeInteropServices: Defines types that support
Platform Invocation Services
Platform Invocation Services, commonly referred to as P/Invoke, is a feature of Common Language Infrastructure implementations, like Microsoft's Common Language Runtime, that enables managed code to call native code.
Managed code, such as C# or ...
(P/Invoke).
Network Library
The Network Library provides simple networking services including direct access to network ports as well as HTTP support. It defines types in the following namespaces:
;System: Defines types that provide an object representation of a
uniform resource identifier
A Uniform Resource Identifier (URI) is a unique sequence of characters that identifies a logical or physical resource used by web technologies. URIs may be used to identify anything, including real-world objects, such as people and places, conc ...
(URI) and easy access to the parts of the URI.
;System.CollectionsSpecialized: Defines specialized and strongly-typed collections; for example, a linked list dictionary, a bit vector, and collections that contain only strings.
;SystemNet: Defines types that provide a simple programming interface for a number of
network protocols
A communication protocol is a system of rules that allows two or more entities of a communications system to transmit information via any kind of variation of a physical quantity. The protocol defines the rules, syntax, semantics and synchroniza ...
.
;System.NetSockets: Defines type that provide a managed implementation of the
Windows Sockets (Winsock) interface for developers who need to tightly control access to the network.
Reflection Library
The Reflection Library provides the ability to examine the structure of types, create instances of types and invoke methods on types, all based on a description of the type. It defines types in the following namespaces:
;System: Defines the
void type
The void type, in several programming languages derived from C and Algol68, is the return type of a function that returns normally, but does not provide a result value to its caller. Usually such functions are called for their side effects, ...
, a return value type for a method that does not return a value.
;SystemGlobalization: Defines type that provide information about a specific culture (called a locale for unmanaged code development). The information includes the names for the culture, the writing system, the calendar used and formatting for dates and sort strings.
;SystemReflection: Defines types that provide a managed view of loaded types, methods and fields, and that can dynamically create and invoke types.
;System.SecurityPermissions: Defines types that control access to operations and resources based on policy. These types are relevant to the
reflection Reflection or reflexion may refer to:
Science and technology
* Reflection (physics), a common wave phenomenon
** Specular reflection, reflection from a smooth surface
*** Mirror image, a reflection in a mirror or in water
** Signal reflection, in ...
.
XML Library
The XML Library provides a simple "pull-style" parser for XML. It is designed for resource-constrained devices, yet provides a simple user model. It defines types in the following namespace.
;SystemXml: Defines types for processing
XML
Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable ...
.
Extended Array Library
The Extended Array Library provides support for non-vector arrays. That is, arrays that have more than one dimension or
arrays that have non-zero lower bounds.
The Extended Array Library doesn't add any extra types, but it does extend the array-handling mechanism.
Extended Numerics Library
The Extended Numerics Library provides support for floating-point (SystemSingle, SystemDouble) and extended-precision (SystemDecimal) data types. Like the Base Class Library, this library is directly referenced by the C# standard.
Parallel Library
The Parallel Library provides easy parallelism for non-expert programmers, so that multithreaded CPUs can be exploited.
Vararg Library
The Vararg Library provides support for dealing with variable-length argument lists.
See also
*
List of data types of the Standard Libraries
*
Framework Class Library
The Framework Class Library (FCL) is a component of Microsoft's .NET Framework, the first implementation of the Common Language Infrastructure (CLI). In much the same way as Common Language Runtime (CLR) implements the CLI Virtual Execution Sy ...
References
External links
Ecma International, Standard ECMA-335, Common Language Infrastructure (CLI), 6th edition (June 2012)
{{Common Language Infrastructure
Common Language Infrastructure