How to determine if object is of type IEnumerable ?
Code:
namespace NS { class Program { static IEnumerable GetInts()
You can use the is keyword.
is
[TestFixture] class Program { static IEnumerable GetInts() { yield return 1; } [Test] static void Maasd() { var i = GetInts(); Assert.IsTrue(i is IEnumerable); } }