.Net Framework®
Components and Resources
Articles for .Net Framework Developers
Featured Article

Generating .Net Source Code

An article that demonstrates how to build a, language-independent, Code Document Object Model (CodeDOM) using the types in the System.CodeDom namespace to generate source code in any, supported, .Net Framework language. The article discusses and demonstrates, with sample code, how to generate types i.e. class, enum, interface and struct, type members e.g. events, fields, properties, methods, etc. and code expressions and statements. Language-specific code providers are discussed and demonstrated and the source code output generated by the CSharp and Visual Basic code providers is shown for each of the CodeDOM generation code samples.

Topics discussed and demonstrated include:

  • The language-independent Code Document Object Model (CodeDOM).
  • Code Providers, creating, querying, initializing and generating source code.
  • Generating types, constructors, fields, events, properties and methods.
  • Generating generic types and specifying generic types as base classes.
  • Specifying the base type and interface implementations of a generated type.
  • Specifying the visibility and scope of types and type members.

All topics include sample code to demonstrate building the relevant section of the CodeDOM and the generated source code output by the CSharp and Visual Basic code providers from the sample generation code.

Finding Articles

Some of the more recent and/or popular articles available on the site are listed on the menu on the left of this page and can, therefore, be accessed directly. All articles are categorised and each category can be browsed by selecting the relevant category e.g. "How To", "Tutorials" etc from the menu. The category pages provide the title of each article together with a summary of the contents and a link to take you to the article's page. To browse through all of the available articles use the "All Categories" menu link. Within each category, articles with a similar subject or theme are grouped together to make it easier to locate an article on a specific topic and to display other similar articles that may also be of interest.

Provider Based Services

An article that demonstrates how to implement the Provider Design Pattern in a Windows Forms system. The provider model is used to develop a line of business system in which the client application is decoupled from the business logic and data services to create a system that is inherently flexible and easy to extend. The article demonstrates how to extend the ProviderBase abstract base class to develop feature specific provider base classes and how to use the base classes in a loosely coupled satellite class library assembly.

User Application Settings

An article explaining the concept of user application settings for .Net Framework Windows Forms applications. The article demonstrates how to create, serialize and deserialize application settings and how to develop your own custom application settings provider. The functionality of an application settings provider that supports the encryption of user application settings is discussed and you can also download the CSharp or Visual Basic source code for the settings provider.

Accessing The File System From .Net

An introduction to a series of articles that discuss and demonstrate, with sample code, how to access and manage file system objects from CSharp code. The series demonstrates how to access and manage file system drives, directories and files.

Using The Recycle Bin From CSharp

An article that demonstrates a managed code solution to using the system Recycle Bin from CSharp code. The article also demonstrates how to display progress reporting and an option to cancel when copying, deleting and moving folders and files.