Base Class Libraries CommunityThe Base Class Libraries (BCL) provides the fundamental building blocks for any application you develop, be it an ASP.NET application, a Windows Forms application, or a Web Service. The BCL generally serves as your main point of interaction with the runtime. BCL classes include: | Namespace | Description | | System | This namespace includes all the essential support you need for your programming, including base types (String, Int32, DateTime, Boolean, etc.), essential environmental support, and math functions, to name a few | | System.CodeDom | all the support necessary to be able to create code, and run it, on the fly | | System.Collections | The System.Collections namespace contains interfaces and classes that define various containers, such as lists, queues, bit arrays, hashtables and dictionaries. | | System.Diagnostics | All the classes you need to diagnose your application, including event logging, performance counters, tracing, and process management APIs. | | System.Globalization | This namespace includes fundamental support for Globalization, used throughout the rest of the Framework | | System.IO | Includes fundamental Stream support which can be used by anyone, and then specifically targets the FileSystem (via File and Directory manipulation classes), SerialPorts, and Decompression | | System.Resources | Used to allow an application to be translated into multiple languages, and then display the appropriate text based upon the current users language selection | | System.Text | This namespace includes support for encodings, and Stringbuilder | | System.Text.RegularExpressions | This namespace includes regular expression support, for robust parsing and matching of string data |
Featured ArticlesCLR Exception and Memory Management This downloadable presentation is an overview of best practices and issues with the usage of exceptions, and different issues surrounding memory management including the IDisposable pattern, finalizers, memorypressure, HandleCollector, and why the using statement (Using in VB) is your friend! It's an excellent overview of some fundamental exception and memory management topics. | Base Class Library (BCL) Frequently Asked Questions (FAQ) Get answers to frequently asked questions about the Base Class Library (BCL). | Base Class Library Code Samples Download these samples to learn more about the .NET Framework Base Class Libraries. | Meet the Base Class Library Team Wondering who responded to your question, and what they do at Microsoft (besides answer your questions)? This page tells you about the members of the BCL team. |
ArraysArray Types in .NET Jeffrey Richter describes how to work with arrays in the Microsoft .NET common language runtime (CLR). |
Breaking ChangesBreaking Changes in a Managed World Have you ever wondered how a breaking change is defined in managed code? This content talks about the variety of possible definitions for breaking changes from backwards, to binary, to source incompatible. It then lists a variety of breaking changes, as well as things which are explicitly treated as non-breaking changes. Included are examples for the vast majority of the breaking change issues. These definitions and examples can help understand which things are avoided most commonly when one version of the framework is upgraded to the next. | MSDN TV: Identifying and Mitigating Managed Breaking Changes This episode highlights issues regarding breaking changes in managed code. It covers numerous points behind breaking changes, outlines issues to be aware of, and gives various demonstrations on how seemingly innocuous changes might break client code. |
CodeDomCodeDom Test Suite
This suite is used to test the CodeDom within the .NET Framework team. The CodeDom test suite is a collection of tests that enables writers of custom code providers a way to verify that they are generating and compiling code from their provider properly. Each test takes a pre-built CodeDom tree and generates and compiles the tree using the provider supplied to it on the command line. The tests then verify the assembly generated from the code provider through reflection. Also provided next to each CodeDom tree as source code comments is the generated C# code from that tree. This will be useful for those wanting to see what CodeDom constructs match up with which C# constructs. The test suite has been updated to include the testing of Whidbey CodeDom features, test case extensibility, an improved interface, and source code comments. Please send any feedback to The Base Classes Team. | MSIL Code Provider The Microsoft Intermediate Language (MSIL) code provider takes a CodeDom tree and generates MSIL syntax. MSIL code provider generates all the CodeDom elements that are part of the 1.1 conformance spec. MSIL code provider generates code for most of the CodeDom types that shipped in V1.1. | Subset Code Provider This CodeDom provider consumes CodeDom trees in the way the C# code provider does, but whenever a node that does not fall into the subset is encountered, it emits a #error in the generated code. This will alert to the CodeDom tree builder of any place in their code where they don't meet subset conformance. |
Delegates And EventsMaking Asynchronous Method Calls in the .NET Environment In .NET you can call any method asynchronously by defining a delegate for the method and calling the delegate's asynchronous methods. This article explains delegates in .NET and how to use them to perform asynchronous calls, eliminating threading problems. | Raising and Responding to Events This article addresses raising and responding to events in Visual Basic .NET, and how to utilize the flexibility Visual Basic .NET offers in associating event handlers with events, including dynamic association of event handlers with events at run time. | Delegates in .NET: A Primer on Creating Type-Safe References to Methods in Visual Basic .NET Delegates, new in Visual Basic .NET, are type-safe, object-oriented references to methods. This article provides an introduction to delegates, their benefits, and how they are used. | An Introduction to Delegates, Part 1 Jeffrey Richter demystifies delegates. Learn how to create and use delegates, including using them to call static methods and instance methods. | An Introduction to Delegates, Part 2 Part 2 of Jeffrey Richter's introduction to delegates focuses on the _prev field, as well as how linked-list delegate chains are managed and used. | An Introduction to Delegates, Part 3 In the third of his series of columns on delegates, Jeffrey Richter introduces events, the most common use of delegates. |
GenericsIntroducing Generics in the CLR Jason Clark takes a peek into the future by introducing generics, which will be coming soon to the common language runtime (CLR) and discusses the benefits that generics bring to your code. | More on Generics in the CLR Jason Clark digs deeper into the internal workings of the CLR with respect to generics. read along as Jason covers type constraints, generic classes, methods, structures, and the upcoming generic class libraries. |
Globalization
Library AnalysisLibCheck LibCheck allows you to compare two versions of an assembly, and determine the differences. The tool reports the differences as a combination of 'removed' and 'added' APIs. The tool is limited to looking only at APIs (i.e, it can't check for behavioral changes), and only compares public differences, or changes which are deemed to be 'breaking'. The tool can be used to quickly determine what has changed between one version of your assembly and another, and can help ensure that you won't introduce any breaking changes to clients of your assembly. Instructions and intended use of the tool are described in the 'libcheck tool specification' document with the zip file. |
Memory ManagementMSDN TV: Resource Management Using the IDisposable Pattern While the CLR's garbage collector does a great job of managing managed memory, often developers have to deal with unmanaged resources. This MSDN TV episode introduces the IDisposable pattern which is a proven strategy for dealing with unmanaged resources. |
Regex
SerializationRun-time Serialization, Part 1 In the first of his three-part series of columns, Jeffrey Richter explains how the Microsoft .NET Framework exposes its serialization and deserialization services. | Run-time Serialization, Part 2 In part 2 of a three-part series, Jeffrey Richter continues the discussion of serialization by focusing on more advanced techniques that allow a type to completely define how it serializes and deserializes itself. | Run-time Serialization, Part 3 This third installment of Jeffrey Richter's three-part series on serialization shows how an application can override the way types serialize themselves. In particular, techniques are discussed that allow you to serialize a type that was not designed for serialization, or what to do when you need to deserialize an object to a different version of a type. | Object Serialization in the .NET Framework Learn about the two most important reasons to use serialization: to persist the state of an object to a storage medium so an exact copy can be recreated at a later stage, and to send the object by value from one application domain to another. These topics and more are covered in this overview of the serialization used in the Microsoft .NET Framework. |
StringsImproving String Handling Performance in .NET Framework Applications See how to optimize your .NET application's string handling using the System.Text.StringBuilder class. Get sample code to see how easy it is, and test results to show you how much faster your application will run. | Writing Culture-Safe Managed Code For developers who write applications that are to run on multiple locales, it is important to consider the issues raised in this article so as to ensure their code functions correctly, even in different languages. |
Threading And TimersThe CLR's Thread Pool Learn how the common language runtime (CLR) thread pool can be used to improve application performance. | Programming the Thread Pool in the .NET Framework Get an in-depth look at thread-pool support in the Microsoft .NET Framework: See why you need a pool, check out the implementation provided in .NET, and find a complete reference for its use in your applications. | Safe Thread Synchronization Jeffrey Richter explains how thread synchronization is exposed via the .NET Framework. | Implementing Coroutines for .NET by Wrapping the Unmanaged Fiber API Coroutines can save processor overhead and reduce redundancy because they allow you to stop execution of a procedure midstream, return a value, and resume exactly where the procedure left off. This article shows how coroutines can be implemented for the .NET Framework by using the Fiber API and Managed Extensions for C++, and how they can be easily used with other .NET-compliant languages. This article also shows a sophisticated use of the runtime host for running multiple managed threads on a single OS thread. | Comparing the Timer Classes in the .NET Framework Class Library Writing effective timer-driven managed code requires a clear understanding of program flow and the subtleties of the .NET threading model. The .NET Framework Class Library provides three different timer classes: System.Windows.Forms.Timer, System.Timers.Timer, and System.Threading.Timer. Each of these classes has been designed and optimized for use in different situations. This article examines the three timer classes and helps you gain an understanding of how and when each class should be used. |
TracingTrace Helper Tool (Coming Soon!)
We've added a lot of new features to Tracing in V2.0. A group of testers in the CLR team got together and developed a tool (TraceHelper.exe) that uses these tracing features. Below are the details of this tool and a zipped file of the tool which can be downloaded. This has been built on Beta2 of V2.0 of the framework. TraceHelper is a convenient tool that can be used with applications that use .NET tracing. This tool showcases the new Whidbey tracing and has the following features; Creates or modifies the tracing section of an application configuration file Identify problem points in an application quickly by loading its trace output files and filtering to the area of interest. This tool supports trace output from XmlWriterTraceListener, DelimitedListTraceListener and the DefaultTraceListener. - View live tracing from an application
- Customized filtering of trace records
- Ability to load a very large number of trace records
- Ability to view trace records via a graphical control
- Reading trace source information from an application
|
| |