Note

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

Access to this page requires authorization. You can try .

ArgumentArity Struct

Definition

Namespace:
System.CommandLine
Assembly:
System.CommandLine.dll
Package:
System.CommandLine v3.0.0-preview.5.26302.115
Source:
ArgumentArity.cs
Source:
ArgumentArity.cs
Source:
ArgumentArity.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.

Defines the arity of an option or argument.

public value class ArgumentArity : IEquatable<System::CommandLine::ArgumentArity>
public readonly struct ArgumentArity : IEquatable<System.CommandLine.ArgumentArity>
type ArgumentArity = struct
Public Structure ArgumentArity
Implements IEquatable(Of ArgumentArity)
Inheritance
ArgumentArity
Implements

Remarks

The arity refers to the number of values that can be passed on the command line.

Constructors

Name Description
ArgumentArity(Int32, Int32)

Initializes a new instance of the ArgumentArity class.

Properties

Name Description
ExactlyOne

An arity that must have exactly one value.

MaximumNumberOfValues

Gets the maximum number of values allowed for an argument.

MinimumNumberOfValues

Gets the minimum number of values required for an argument.

OneOrMore

An arity that must have at least one value.

Zero

An arity that does not allow any values.

ZeroOrMore

An arity that may have multiple values.

ZeroOrOne

An arity that may have one value, but no more than one.

Methods

Name Description
Equals(ArgumentArity)

Indicates whether the current object is equal to another object of the same type.

Equals(Object)

Indicates whether this instance and a specified object are equal.

GetHashCode()

Returns the hash code for this instance.

Applies to


Feedback

Was this page helpful?