How can i get the total occurrence of letter K?
<p>I want to check on how many times does k appears. this is
what i have done so far and am not getting the results.</p>

<pre><code>class Program
{
    static void Main(string[] args)
    {
        int count = 0;
        string str = "hnfdjkkedjjykukyukrtrnrkkkkt";
        string l;

        for (int i = 0; i &lt; str.Length; i++)
        {
            l = str.Substring(1, 1);
            if (l == "k")
            {
                count++;
            }
        }
        Console.WriteLine("k appears " + count++ + " times");
        Console.ReadKey();
    }
}
</code></pre>