CodeGenerator.ICodeGenerator.GenerateCodeFromStatement Method

Definition

Generates code for the specified Code Document Object Model (CodeDOM) statement and outputs it to the specified text writer using the specified options.

void ICodeGenerator.GenerateCodeFromStatement (System.CodeDom.CodeStatement e, System.IO.TextWriter w, System.CodeDom.Compiler.CodeGeneratorOptions o);

Parameters

e
CodeStatement

The statement that contains the CodeDOM elements to translate.

w
TextWriter

The text writer to output code to.

o
CodeGeneratorOptions

The options to use for generating code.

Implements

Exceptions

w is not available. w may have been closed before the method call was made.

Applies to

Product Versions
.NET 6 (package-provided), 7 (package-provided), 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9