Q: Access control of panel created dynamically var panel = new Panel()
{
    AutoSize = true,
    Height = 45,
    BackColor = Color.WhiteSmoke,
    Name =  "pnlTaskAssignation"
};

Once I created it I want to access to controls of that panel as:
foreach(Control c in pnlTaskAssignation.Controls)
{
    if(c is ComboBox)
    {
        countLabels++;
    }
}

Problem is I created pannel dinamically so in code I can't reference it. So pnlTaskAssignation does not exists.. How can I do to access panel controls if I created it dinamically?

A: Just keep the original reference to panel. If you like, you can declare the pnlTaskAssignation variable yourself at the class level.
class MyForm
{
    protected Panel pnlTaskAssignation;  //Add this yourself

    public void MyForm_Load(object sender, EventArgs e)
    {
        var panel = new Panel()
        {
            AutoSize = true,
            Height = 45,
            BackColor = Color.WhiteSmoke,
            Name =  "pnlTaskAssignation"
        }
        pnlTaskAssignation = panel; //Save the reference here
    };

Then this code will now work:
foreach(Control c in pnlTaskAssignation.Controls)  //References the member variable defined above
{
    if (c is ComboBox)
    {
        countLabels++;
    }
}

