using System.Collections.Generic;
using System.Net.NetworkInformation;
using System.Threading.Tasks;
using System.Threading.Tasks.Dataflow;
using System.Text.RegularExpressions;
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()
Dictionary<DateTime, List<string>> Sample = new Dictionary<DateTime, List<string>>();
Sample.Add( DateTime.Parse("5/8/2018 11:18:00 AM"), new List<string>());
Sample.Add( DateTime.Parse("5/8/2018 11:17:46 AM"), new List<string>());
Sample.Add( DateTime.Parse("2/27/2010 1:06:49.123456 PM"), new List<string>());
Sample.Add( DateTime.Parse("5/8/2018 11:18:08 AM"), new List<string>());
DateTime date = DateTime.Parse("2/27/2010 1:06:49 PM");
foreach (KeyValuePair<DateTime, List<string>> k in Sample)
if (date.Ticks/10000000 == k.Key.Ticks/10000000)
Console.WriteLine("Yes");