.NET Framework 1.0 Overview
.NET Framework 1.0 Overview
The .NET Framework, released in February 2002, is Microsoft's managed code platform. It introduces a common runtime (CLR), a unified class library, and language interoperability.
Key Components
- CLR (Common Language Runtime): The execution engine. Manages memory (garbage collection), type safety, exception handling, and security. Analogous to the Java Virtual Machine.
- BCL (Base Class Library): A comprehensive set of classes for I/O, networking, collections, XML, ADO.NET, ASP.NET, and more. Organized in namespaces (e.g.,
System.IO,System.Data). - CTS (Common Type System): Defines all types supported by the CLR. Ensures type compatibility across languages.
- CLS (Common Language Specification): A subset of the CTS that all .NET languages must support to ensure interoperability.
- IL (Intermediate Language): All .NET languages compile to IL (also called MSIL). The CLR JIT-compiles IL to native code at runtime.
.NET Languages
| Language | Description |
|---|---|
| C# | New language designed for .NET. C-style syntax, type-safe, object-oriented. |
| VB.NET | Visual Basic redesigned for .NET. Not backward-compatible with VB6. |
| Managed C++ | C++ with CLR extensions. Can mix managed and unmanaged code. |
| JScript.NET | JScript with .NET types and compilation. |
Assemblies
A .NET assembly is a .dll or .exe containing IL code, metadata, and a manifest. Assemblies replace COM registration — you can deploy by simply copying files (XCOPY deployment).
- Private assemblies: Deployed in the application's directory. No registration needed.
- Shared assemblies: Deployed to the Global Assembly Cache (GAC). Must be strong-named (signed).
Garbage Collection
The CLR uses a generational garbage collector. Objects are allocated in generation 0. Surviving objects promote to generation 1, then generation 2. This design optimizes for the common case where most objects are short-lived.
COM Interop
.NET can call COM objects and COM can call .NET objects. The tlbimp tool generates .NET wrappers for COM type libraries. The regasm tool registers .NET assemblies for COM access.