Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

SymbolResult.AddError(String) Method

Definition

Namespace:
System.CommandLine.Parsing
Assembly:
System.CommandLine.dll
Package:
System.CommandLine v3.0.0-preview.5.26302.115
Source:
SymbolResult.cs
Source:
SymbolResult.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Adds an error message for this symbol result to it's parse tree.

public:
 virtual void AddError(System::String ^ errorMessage);
public virtual void AddError(string errorMessage);
abstract member AddError : string -> unit
override this.AddError : string -> unit
Public Overridable Sub AddError (errorMessage As String)

Parameters

errorMessage
String

Remarks

Setting an error will cause the parser to indicate an error for the user and prevent invocation of the command line.

Applies to


Feedback

Was this page helpful?