add event to all labels in form : <p>I want to add click,mouseleave and mouseenter event to all labels in the form using code below. But  i call the addeventtoalllabels on form_load but it wont add event to labels.</p>

<pre><code>  public void setColor()
        {
            if (clickedLabel != default(Label))
                clickedLabel.BackColor = Color.Yellow;
            //Resetting clicked label because another (or the same) was just clicked.
        }
        void addeventtoalllabels()
        {
            foreach (Label c in this.Controls.OfType&lt;Label&gt;())
            {
                try
                {
                    c.Click += (sender, e) =&gt; {
                        setColor(); 
                        Label theLabel = (Label)sender;
                        clickedLabel = theLabel;
                    };
                    c.MouseEnter += (sender, e) =&gt;
                    {
                        Label theLabel = (Label)sender;
                        if (theLabel != clickedLabel)
                            theLabel.BackColor = Color.Red;
                    };

                    c.MouseLeave += (sender, e) =&gt;
                    {
                        Label theLabel = (Label)sender;
                        if (theLabel != clickedLabel)
                            theLabel.BackColor = Color.Yellow;

                    };
                        }
                catch { }


            }

        }
</code></pre>
