This is my Program:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
    class Myclass
    {
        static void Main(string[] args)
        {
            Myclass d = new Myclass();
            d.Myprog("ahasda");
        }
        void Myprog(params string[] s)
        {          
            int num=0;
            foreach (string r in s)
            {
                if (r.Contains('a'))
                {
                    num++;
                }     
            }
            Console.WriteLine(num);   
        }
    }
}

I want to know a few characters in my strings while I code shows only one.
What to correctly display the desired number of characters do?

static void Main(string[] args)
        {
            Program d = new Program();
            d.Myprog("ahasda");
            Console.ReadLine();
        }
        void Myprog(params string[] array)
        {
            int num = 0;

            foreach (string str in array)
            {
                foreach (char c in str)
                {
                    if (c.Equals('a'))
                        num++;
                }
            }
            Console.WriteLine(num);
        }
This question has already been answered. Start a new discussion instead.