Find no. of occurrence of each character in a string in C#.net ,C,Java etc..? :   
  **Find no. of occurrence of each character in a string  in C#.net?**
  
*given string to count of each character to find below code I hope it is understand easy way logic *
    
        protected void btnSave_Click(object sender, EventArgs e)
                    {
                        var Firstname = txtFname.Text;
                        var lastName = txtLastName.Text;
                        var FullName = Firstname + "" + lastName;
            
                        char[] charArray = FullName.ToLower().ToCharArray();
                        Dictionary<char, int> counter = new Dictionary<char, int>();
                        int tempVar = 0;
                        foreach (var item in charArray)
                        {
                            if (counter.TryGetValue(item, out tempVar))
                            {
                                counter[item] += 1;
                            }
                            else
                            {
                                counter.Add(item, 1);
                            }
                        }
                        //var numberofchars = "";
                        foreach (KeyValuePair<char, int> item in counter)
                        {
                            if (counter.Count > 0)
                            {
                                //Label1.Text=split(item.
                            }
                            Response.Write(item.Value + " " + item.Key + "<br />");  
                        }
                     
                    }