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.

警告

ICodeCompiler has been deprecated. Use the methods directly on the CodeDomProvider class instead. Classes inheriting from CodeDomProvider must still implement this interface, and should suppress this warning or also mark this method as obsolete.

警告

ICodeCompiler is obsolete

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

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 ();
[System.Obsolete("ICodeCompiler has been deprecated. Use the methods directly on the CodeDomProvider class instead. Classes inheriting from CodeDomProvider must still implement this interface, and should suppress this warning or also mark this method as obsolete.")]
public abstract System.CodeDom.Compiler.ICodeCompiler CreateCompiler ();
public abstract System.CodeDom.Compiler.ICodeCompiler CreateCompiler ();
[System.Obsolete("ICodeCompiler is obsolete")]
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.")>]
abstract member CreateCompiler : unit -> System.CodeDom.Compiler.ICodeCompiler
[<System.Obsolete("ICodeCompiler has been deprecated. Use the methods directly on the CodeDomProvider class instead. Classes inheriting from CodeDomProvider must still implement this interface, and should suppress this warning or also mark this method as obsolete.")>]
abstract member CreateCompiler : unit -> System.CodeDom.Compiler.ICodeCompiler
abstract member CreateCompiler : unit -> System.CodeDom.Compiler.ICodeCompiler
[<System.Obsolete("ICodeCompiler is obsolete")>]
abstract member CreateCompiler : unit -> System.CodeDom.Compiler.ICodeCompiler
Public MustOverride Function CreateCompiler () As ICodeCompiler

傳回

ICodeCompiler

ICodeCompiler,可以用來編譯以 System.CodeDom 為基礎的原始程式碼表示。

屬性

備註

此方法在 .NET Framework 2.0 中已過時。 建議的替代方法是呼叫 ICodeCompiler 直接在程式碼提供者中使用的方法。

給實施者的注意事項

在 .NET Framework 2.0 中,您應該實 ICodeCompiler 作 類別中的 CodeDomProvider 成員,並在呼叫此方法時擲回 NotSupportedException

適用於