CodeDomProvider.CreateCompiler 方法

定義

警告

Callers should not use the ICodeCompiler interface and should instead use the methods directly on the CodeDomProvider class. Those inheriting from CodeDomProvider must still implement this interface, and should exclude this warning or also obsolete this method.

當在衍生類別中覆寫時,會建立一個新的程式碼編譯器。

public:
 abstract System::CodeDom::Compiler::ICodeCompiler ^ CreateCompiler();
public abstract System.CodeDom.Compiler.ICodeCompiler CreateCompiler();
[System.Obsolete("Callers should not use the ICodeCompiler interface and should instead use the methods directly on the CodeDomProvider class. Those inheriting from CodeDomProvider must still implement this interface, and should exclude this warning or also obsolete this method.")]
public abstract System.CodeDom.Compiler.ICodeCompiler CreateCompiler();
abstract member CreateCompiler : unit -> System.CodeDom.Compiler.ICodeCompiler
[<System.Obsolete("Callers should not use the ICodeCompiler interface and should instead use the methods directly on the CodeDomProvider class. Those inheriting from CodeDomProvider must still implement this interface, and should exclude this warning or also obsolete this method.")>]
abstract member CreateCompiler : unit -> System.CodeDom.Compiler.ICodeCompiler
Public MustOverride Function CreateCompiler () As ICodeCompiler

傳回

一個 ICodeCompiler 可用於編譯 System.CodeDom 基於原始碼表示的

屬性

備註

這個方法已過時。 建議的替代方案是呼叫 ICodeCompiler 程式碼提供者中直接可用的方法。

給實施者的注意事項

你應該實作 ICodeCompiler 類別中的 CodeDomProvider 成員,並在呼叫此方法時拋出 a NotSupportedException

適用於