How to call InitializeComponent function?
In a winform project,Add a new xsd(Typed Dataset) file at project.
Then open DataSet1.cs project file,Show Designer and Properties toolbox.
Click events button in Properties toolbox,Select and double click Initialized event.Vs 2005 automatic Create following in DataSet1.cs.
public void InitializeComponent()
{
((System.ComponentModel.ISupportInitialize)(this)) .BeginInit();
//
// DataSet1
//
this.CaseSensitive = true;
this.Initialized += new System.EventHandler(this.DataSet1_Initialized);
((System.ComponentModel.ISupportInitialize)(this)) .EndInit();
}
Now,I add below content to DataSet1.cs document...
private void DataSet1_Initialized(object sender, System.EventArgs e)
{
...//My initialized code
}
But,during the do the project and create a new DataSet1 object,we find InitializeComponent method don't do it at all.
How to create DataSet1 object to immediate run the InitializeComponent method?
|