using System.Collections.Generic;
using System.Net.NetworkInformation;
using System.Threading.Tasks;
using System.Threading.Tasks.Dataflow;
using System.Text.RegularExpressions;
using System.Globalization;
private static List<IPStatus> _results;
public static async Task MyMethodAsync(IPAddress ip)
Console.WriteLine("processing");
public static async Task Asd()
var options = new ExecutionDataflowBlockOptions{MaxDegreeOfParallelism = 2};
var block = new ActionBlock<IPAddress>(ip => MyMethodAsync(ip), options);
var list = new List<IPAddress>{IPAddress.Loopback, IPAddress.Loopback, IPAddress.Loopback, IPAddress.Loopback, IPAddress.Loopback, IPAddress.Loopback, IPAddress.Loopback, IPAddress.Loopback, IPAddress.Loopback};
public static void Main()
List<string> ListTest = new List<string>();
ListTest.Add("01293821921DE is refunded successfully");
ListTest.Add("0123821921DE is refunded successfully");
ListTest.Add("01693821921DE is refunded successfully");
Console.WriteLine("\n List in Order \n");
foreach(var item in ListTest)
Console.WriteLine("\n List in Reverse Order \n");
for(int i = ListTest.Count() - 1; i >= 0; i-- )
Console.WriteLine(ListTest[i]);