Im just trying to get a handle on where code that does work should be written in a Winforms application.
For example, in my sample Winforms application below, I have to binddata from a table in a database to a tree, and I do all that dataBinding etc in a BindTree() method. So do i call the BindTree() method after the InitializeComponent() in the forms constructor, or do i call the method in the Load event of the form?
Is there a best practice solution? Is there an advantage of one vs. the other?
Thanks
namespace Sample
{
public partial class Module : Form
{
public Module()
{
InitializeComponent();
// does the BindTree() go here?
}
private void Module_Load(object sender, EventArgs e)
{
//or do i create the load event and put the method here?
BindTree();
}
You are so wise...like a miniature budha covered in fur. -Anchorman