To analyze the Base Class Libraries first we look into the class Library first
In general
Book
Library: Means collection of books
CD Library
:Means Collection of CDs, similarly
Class
Library:
- Means Collection of classes and Every class contain some predefined functions which are used to write the code in .net
- Class Libraries in .NET are similar to Header Files in C/C++ and Packages in JAVA
- Class Libraries in .Net are known as Assemblies
- Class Libraries in .net are self describing in nature
Class
Library
:-·
- A Class Library in .net is either in the form of DLL (Dynamic Link Library) or in the form of exe (Executable File)
- If we look into Hierarchy of a class Library:
Book
library
Class library
Racks
Namespaces
Books
Classes
Pages Predefined
Functions
Matter
Code
- This Hierarchy is maintained to avoid the confusion and duplicate names of classes and functions while accessing them
- Like to access any page in any book First we go to particular Book Library in the city, then to a particular Rack in the Library, then to a particular Book in the Rack then to a required Page in a book i.e.
- Book Library---Rack---Book---Page
- Similarly to access any pre defined function First we go to a particular Class Library, then to a particular Namespace, then to a particular class and then to a particular function like
- Class Library Name .Name Space Name. Class Name. Function Name
- Here “.” is known as Member Access Operator
- In .Net there can be 2 or more classes with same name but they will be stored or present in different namespaces
- Also there can be 2 or more functions with the same but they will be stored or present on different classes
- A Class library can be of two categories
2)Base Class Libraries (BCL)
User Defined Class Libraries
These are created by the programmer for reusability purpose within the programs or applications created in .net
Base Class Libraries
- Base Class Libraries are designed by Microsoft
- Without these we cannot write any code within the .net, so Base Class Libraries are known as building blocks of applications or programs of .net
- These are installed in a machine when we install .Net framework into the machine
- Physical location of Base Class Libraries
- Root drive : \OS folder \ assembly folder i.e.
- C: \windows \ assembly
- These are the almost 500 Base Class Libraries, 12,909 classes and 4,01,759 predefined functions are present in .net framework 2.0 version
- We can expect more than 5,00,000 predefined functions in .net framework 4.0 version
- As we are looking that any assembly / Class Library in .Net will exist either in the form of DLL or Exe
- Types of Assemblies
2)Public Assembly
3)Static Assembly
4)Dynamic Assembly
5)Satellite Assembly
According to Microsoft there are only two types of Assemblies are Available i.e.,1 &2
Private Assembly
- If an assembly is copied into individual application on which we want to use then it is known as private (or) local assembly
- The copy of the assembly is local to that application cannot use this copy.
- If an assembly is copied into a global place and the reference of the assembly is known as public or global or shared assembly
- The Global place is known as GAC (Global Assembly Cache)
- Physical location of GAC is
- Root drive: \ OS folder \ assembly folder .i.e.
- C: \windows \ assembly


No comments:
Post a Comment