Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Constructor firing Inheritance in C#
Message
De
23/01/2006 12:16:03
John Baird
Coatesville, Pennsylvanie, États-Unis
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01088705
Message ID:
01089426
Vues:
13
>This has been an interesting thread to follow. Thanks for all of your replies.
>I wont refactor - I dont chew my cabbage twice ;-) Just kidding
>My head is slightly stuck in VFP's object model.
>
I agree, there is a definite shift of thinking between vfp and .net. The thing I find problematic (it may just be my lack of .net fluency) is the following scenario:
public class Myform
{
     public void Myform()
     {
     }

    private void Myform_Load(object sender, EventArgs e)
    {
         MessageBox.Show("in the base load event");
    }
}

public class Ourform : Myform
{
     public void Ourform()
     {
     }

    private void Ourform_Load(object sender, EventArgs e)
    {
         MessageBox.Show("in the our form load event");
    }
}
I would expect the load event of ourform to fire but no the base unless i specifically called the base. However, both fire and I have yet to figure out how to prevent code in the base.load event from firing if I don't want it to.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform