diff --git a/src/System.CommandLine/Option.cs b/src/System.CommandLine/Option.cs index b8fd96a77f..77ff4c47c1 100644 --- a/src/System.CommandLine/Option.cs +++ b/src/System.CommandLine/Option.cs @@ -169,7 +169,7 @@ public string? ArgumentHelpName public virtual ArgumentArity Arity { get => Argument.Arity; - init + set { if (value.MaximumNumberOfValues > 0) { diff --git a/src/System.CommandLine/Option{T}.cs b/src/System.CommandLine/Option{T}.cs index d5e3e82bfe..0d890c814b 100644 --- a/src/System.CommandLine/Option{T}.cs +++ b/src/System.CommandLine/Option{T}.cs @@ -65,7 +65,7 @@ public Option( public override ArgumentArity Arity { get => base.Arity; - init => Argument.Arity = value; + set => Argument.Arity = value; } } } \ No newline at end of file