public static void Main(string[] args) { testy sample = new testy(); sample.test(); sample.testD(); Console.ReadKey(); }
public void TestMethod1() { DateTime dtNow = DateTime.Now; IEnumerable <DateTime> jj = null; List <testy> ddss = new List <testy>(); testy dd = new testy(); // bool uu = dtNow is System.Collections.IEnumerable; for (int i = 0; i < 100; i++) { dd.Add(dtNow.AddDays(i)); } ddss.Add(dd); string pp = ddd(dd); string ss = Dump.GetValue(ddss); var t = ss.Length; Assert.AreEqual(ss, dtNow.ToString()); if (dd != null) { if (dd.GetType().GetInterfaces().Any( i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IEnumerable <>))) { var ssss = dd.GetType().GetInterfaces().Where( i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IEnumerable <>)); } } }