System.CodeDom.Compiler.CompilerInfo.CreateDefaultCompilerParameters Method

Gets the configured compiler settings for the language provider implementation.

Syntax

public CompilerParameters CreateDefaultCompilerParameters ()

Returns

A read-only System.CodeDom.Compiler.CompilerParameters instance that contains the compiler options and settings configured for the language provider.

Remarks

Use the CompilerInfo.CreateDefaultCompilerParameters method to examine the compiler settings of the System.CodeDom.Compiler.CompilerInfo instances returned by the CodeDomProvider.GetAllCompilerInfo and CodeDomProvider.GetCompilerInfo(string) methods.

The <system.codedom> Element in the machine configuration file contains the language provider and compiler configuration settings for each System.CodeDom.Compiler.CodeDomProvider implementation on the computer. Each language provider configuration element can contain optional compilerOptions and warningLevel attributes. These attributes define the default values for the CompilerParameters.CompilerOptions and CompilerParameters.WarningLevel properties.

If the language provider configuration element does not define the compilerOptions attribute, the CompilerParameters.CompilerOptions property value is an empty string (""). If the language provider configuration element does not define the warningLevel attribute, the CompilerParameters.WarningLevel property value is –1.

Requirements

Namespace: System.CodeDom.Compiler
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0