using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Delegates
{
    class Example23
    {
        // Example 9-23
        public static int GetIndexOfFirstNonEmptyBin(int[] bins)
        {
            return Array.FindIndex(
                bins,
                delegate(int value) { return value > 0; }
            );
        }
    }
}
