ICodeGenerator.GenerateCodeFromStatement(CodeStatement, TextWriter, CodeGeneratorOptions) 方法

定義

為指定的程式碼文件物件模型 (CodeDOM) 陳述式產生程式碼,並使用指定的選項將它輸出到指定的文字寫入器。Generates code for the specified Code Document Object Model (CodeDOM) statement and outputs it to the specified text writer using the specified options.

public:
 void GenerateCodeFromStatement(System::CodeDom::CodeStatement ^ e, System::IO::TextWriter ^ w, System::CodeDom::Compiler::CodeGeneratorOptions ^ o);
public void GenerateCodeFromStatement (System.CodeDom.CodeStatement e, System.IO.TextWriter w, System.CodeDom.Compiler.CodeGeneratorOptions o);
abstract member GenerateCodeFromStatement : System.CodeDom.CodeStatement * System.IO.TextWriter * System.CodeDom.Compiler.CodeGeneratorOptions -> unit
Public Sub GenerateCodeFromStatement (e As CodeStatement, w As TextWriter, o As CodeGeneratorOptions)

參數

e
CodeStatement

CodeStatement,包含要轉譯的 CodeDOM 項目。A CodeStatement containing the CodeDOM elements to translate.

w
TextWriter

為程式碼輸出目的的 TextWriterThe TextWriter to output code to.

o
CodeGeneratorOptions

CodeGeneratorOptions,表示要用來產生程式碼的選項。A CodeGeneratorOptions that indicates the options to use for generating code.

適用於

另請參閱