Introducing Radical.sh

Forget Code launches a powerful code generator for building API's

IENUMERABLE - Passing as an argument in C#

using System;
using System.Collections.Generic;
using System.Linq;

namespace ForgetCode
{
    public class MainClass
    {
        public static void Main()
        {
            Display(new List<bool> { true, false, false });
        }

        static void Display(IEnumerable<bool> argument)
        {
            foreach (bool value in argument)
            {
                Console.WriteLine(value);
            }

        }
    }
}


In the above code, we are passing IEnumerable object reference to a method.
Output:
True
False
False