public static void Main()
string strOccur,strChar = null;
Console.WriteLine("Enter the string in which you need to find the count of a char occurance");
strOccur = Console.ReadLine();
strOccur = strOccur.Trim().ToUpper();
Console.WriteLine("Enter the char to be searched..");
strChar = Console.ReadLine().ToUpper();
int intCnt =strOccur.Length- strOccur.Replace(strChar, string.Empty).Length;
Console.WriteLine("Count of occurance is "+intCnt);