Introduction COM in C# COM stands for "Common object modal". com is a kind of specification to make the component reusable. All the active components are by default com components. com is a concept-its practical implementation is activex. ========= ABOVE CONCEPT WAS USED IN VB/VC++/C++========= In .NET for this purpose we use assembly Assembly is the component modal for .NET. Assembly 1. It contains the meta data (data about data). 2. Project details: Name/version/author/creation date/creation time/ and IL (Intermediate language). Assembly have two parts: 1. Manifest : Name, Author, Creation date, Time. 2. Body : IL
To view assembly: C:\>ILDASM A.EXE Types of assembly 1. Private assembly:for same project 2. Public or shared assembly:for any project Assembly comes in the form of .DLL (Dynamic link library) .EXE (Executable file) Difference between .dll & .exe DLL EXE 1. Not self executed 1. Self executable 2. No Main() 2. Main() 3. In Process 3. Out Process (Execute in client memory) (Hold separate memory) 4. light weight 4. heavy weight
How to make a .dll :
1.Class library : There will be Class( method/constructor/property) 2. Window control library : There will be user defined control. How to make a class library 1. Open visual studio-->File menu- select new project- select C# class library-name-location then OK.
2. Coding 3. Build (After that .dll will create) Another example Windows control library 1. Open visual studio -File menu-new project -C#-windows form control library-name--ok
Example: Digital clock Take label and timer form Toolbox.
2. Coding 3. Bulid solution
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: