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()
var s = "hello world orl";
List<char> repeatedChars = new List<char>();
List<char> tmp = new List<char>();
for(int i = 0; i< s.Length - 1; i++)
repeatedChars.Add(s[i+1]);
for(int i = 0; i< s.Length - 1; i++)
if(s.Count(f=> f == s[i]) > 1)
int substringmatchsize= 1;
while ( s.Count(f=>f= s.Substring(i,i+substringmatchsize)) >1)
Console.Write("\nOUTPUT\n");