You are on page 1of 8

Libraries

Definition
• This is the place where the actual functionality is implemented.
• In other words, they contain a function body.
• We typically see libraries at the uppermost part of our source code along with the
#include, or import keyword.
• Categories of libraries:
• Static
• Shared / Dynamic
Static Libraries
• They are linked with an end-user program and include object code.
• These are only used during compilation.
• They must be available in the proper place when the user wishes to create an application.
Shared / Dynamic Libraries
• These are only required at run-time.
• The user can compile his/her code without using these libraries.
• They are linked against at compile time to resolve undefined references and then its
distributed to the application so that the application can load it at run time.
Uses
• Typically, all certified implementations of a programming language contain the most
widely used libraries.
• Libraries are groups of non-volatile resources utilized by programs in programming.
• These include configuration information, textual instructions, sample code, subroutines,
and classes.
Importance
• Reusability is the key justification for utilizing libraries.
• The majority of libraries have functions that a regular user could not duplicate.
• Without these libraries, each user would need to be familiar with every nuance of their
own programming language.
• The huge reduction in coding time is another clear advantage.
Examples in C#
Do you have
any
questions?

You might also like