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()
char[] a = new char[] { 'a', 'b', 'c', 'd', 'e'};
string str = new string(a);
int index = str.IndexOf('a');