Class Argv
"Argument vector". This class serves as a container for arguments passed to the program at run time.
To read the next available argument, use the Pop() method. Example: ARGV.pop()
.
Inheritance
System.Object
Argv
Namespace: Perlang.Stdlib
Assembly: Perlang.Stdlib.dll
Syntax
public class Argv : object
Constructors
| Improve this Doc View SourceArgv(ImmutableList<String>)
Declaration
public Argv(ImmutableList<string> arguments)
Parameters
Type | Name | Description |
---|---|---|
ImmutableList<System.String> | arguments |
Methods
| Improve this Doc View SourcePop()
Pops the next argument from the list of program arguments. The arguments are popped in FIFO order; the first argument is popped first, the second next, and so forth.
Example usage:
var arg1 = ARGV.pop;
print arg1;
If you are familiar with the concept of queues, this method matches the "dequeue" operation.
Declaration
public string Pop()
Returns
Type | Description |
---|---|
System.String | The next argument. |
Exceptions
Type | Condition |
---|---|
IllegalStateException | There are no arguments left to be popped. |