adamabdelhamed / PowerArgs

The ultimate .NET Standard command line argument parser
MIT License
568 stars 56 forks source link

How to parse into an array? #156

Closed brandonh-msft closed 1 year ago

brandonh-msft commented 1 year ago

I thought by defining the arg as List<T> I would be able to do something like -arg item1 -arg item2 but I'm met with an error that -arg has already been specified. Is there an option/metadata I'm missing?

adamabdelhamed commented 1 year ago

Using a list is supported, but it doesn't let you repeat the argument as you've tried. You would have to do this:

-arg "item1,item2,item3"
brandonh-msft commented 1 year ago

what if my values are strings and contain ,?