public delegate bool InFilter(int i);

        /* Mehtods with a delegate
         * */

        public static int[] FilterInputArray(int[] IntArr, InFilter ObjDelegate)
        {
            ArrayList arr = new ArrayList();    
            foreach (int i in IntArr)
            {
                if (ObjDelegate(i))
                {
                    arr.Add(i);
                }
            }
            return ((int[])arr.ToArray(typeof(int)));
        }

        /* Mehtod to check whether given 
         * number is ODD or not
         * */

        private bool CheckOdd(int i)
        {
            return ((i & 1) == 1);
        }

	int[] Input = {1,2,3,4,5,6,7,8,98,543,76,43,675,8,765,43,54,786,654,543};

	/*Using Standard Approach
             * /
            int[] result = FilterInputArray(Input, CheckOdd);

  	/* Using Anonymous Method call
             * */
            
            int [] resultAnonymous = FilterInputArray(Input,delegate(int i) { return ((i & 1) == 1);});

            /*Using Lamda expression
             * */

            int [] Lamdaresult = FilterInputArray(Input, i => ((i & 1) ==1));

            string strResult = "Odd Numbers are :- ";

            foreach (int i in Lamdaresult)  Note :- Do change the Array name according to method call while copying.
            {
                strResult = strResult + " , " + i.ToString();
            }
            MessageBox.Show(strResult);