This documentation is archived and is not being maintained.

CodeSubDirectoriesCollection Class

Represents a collection of CodeSubDirectory objects. This class cannot be inherited.

Namespace:  System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)

[ConfigurationCollectionAttribute(typeof(CodeSubDirectory), CollectionType = ConfigurationElementCollectionType.BasicMap)]
public sealed class CodeSubDirectoriesCollection : ConfigurationElementCollection

The CodeSubDirectoriesCollection defines an ordered collection of subdirectories containing files compiled at run time. You can have any number of subdirectories. This collection refers to the codeSubDirectories element of the compilation section of the configuration file. The collection will only provide the items defined in the root Web.config or higher. This collection is a construct that allows easy access to the compilation information it contains.

The following configuration-file example defines an ordered collection of assembly subdirectories. This example shows how to declaratively specify values for several properties of the CodeSubDirectoriesCollection class. The subdirectories are listed in the order in which the code must be compiled to meet its dependencies.

      <add directoryName="mySubDir1"/>
      <add directoryName="mySubDir2"/>
      <add codeSubDirectory directoryName="mySubDir3"/>

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0