I am trying to get only odd arguments in a list. Here is a piece of my code
static void Main(string[] args)
{
var swictches = args.ToList().Select((x, index) => (index % 2) == 1);
var ss = swictches[0];
string test = doc.ReadAllPages();
Console.WriteLine(test.Substring(0, 1000));
Console.Read();
}
In the arguments list it has switches and parameters. I am trying to get all the switches. When I run this code the switches variable looks like this:
false
true
false
instead of like this
-i
-awq
-l