Back to VSLive! San Francisco Show Daily Home
CLR Programming With C#
Learn the latest information about managing types, JIT compilations, and garbage collection.
by Donis Marshall
VSLive! San Francisco, February 9, 2005
Note: Sam Gentile presented "Advanced CLR Programming with C#" at C# Live! San Francisco, Tuesday, February 8.
Tuesday's C# Live! attendees got advanced Common Language Runtime (CLR) details—including managing types, Just In Time (JIT) compilations, and garbage collection—when Sam Gentile, Chief Architect of Adesso Systems, presented his session, "Advanced CLR Programming with C#."
Gentile delved into the topic of the Common Language Infrastructure (CLI)—the open source document for the CLR. He explained that the CLI doesn't include ASP.NET, ADO.NET, or WinForms, and that Microsoft's implementation of the CLI is named ROTOR. Gentile described ROTOR as an excellent tool for learning about the CLR and added that a new version of ROTOR will be available within 60 days of the release of .NET Whidbey. He noted other CLI implementations as well, such as Mono and DotGNU.
Gentile also reviewed the Common Type System (CTS), which defines the common types for the .NET languages and enhances language interoperability. Attendees learned about value types, reference types, and the extensive overhead involved with boxing and unboxing, particularly when using collections, though Gentile said Whidbey resolves these boxing issues.
The session included demos of tools useful to .NET developers, including Intermediate Language Disassembler (ILDASM)—which is deployed with the .NET Framework—Reflector, and Component Inspector.
Gentile also covered how JIT compilations are managed within MSCOREE.dll. Essentially, a .NET assembly contains metadata, manifest, and MISL code. A JIT compilation compiles this .NET assembly into native or binary code at run time, and once the binary representation of the method is created, it is cached in memory for later execution.
Garbage collection, which is nondeterministic and largely outside the control of developers, manages collection of reference types using object graphs, memory generation, and a large object heap, Gentile said. He also detailed the perils of finalization, explaining that Whidbey offers new APIs to pressure garbage collection to happen earlier than it does now.
About the Author
Donis Marshall is a computer technology trainer for developers and scientists and an endorsed trainer for Microsoft Global Learning Services. His most recent book for Microsoft Press, Programming Microsoft® Visual C#® 2005 Core Reference, will be published this fall. Reach him at .
Back to top
|