BuildProvider.ProcessCompileErrors(CompilerResults) 方法

定義

當在衍生類別中覆寫時,能讓你檢視編譯器的錯誤訊息,進而修改它們以提供更多資訊。

public:
 virtual void ProcessCompileErrors(System::CodeDom::Compiler::CompilerResults ^ results);
public virtual void ProcessCompileErrors(System.CodeDom.Compiler.CompilerResults results);
abstract member ProcessCompileErrors : System.CodeDom.Compiler.CompilerResults -> unit
override this.ProcessCompileErrors : System.CodeDom.Compiler.CompilerResults -> unit
Public Overridable Sub ProcessCompileErrors (results As CompilerResults)

參數

results
CompilerResults

編譯器結果。

備註

通常你會覆寫此方法,以便在編譯器錯誤顯示前修改,使錯誤文字對使用者更有幫助。 這在你知道某些錯誤上下文並能提供修正資訊給使用者的情境中非常有用。 原始編譯器的錯誤訊息通常針對特定語言結構,可能無法讓使用者明顯看到真正的原因或解決方案。

你可以透過 CompilerResults 傳遞給方法的物件來存取錯誤。

適用於