Hi,
public ProjectEditForm(int projectID) : this()
(base() refers to the parent class constructor)
HTH,
Viv
>I am passing in a parameter to a biz form:
>
>the code in the parameterised constructor fails because the object has not been instantiated yet.
>Now from the help - the bizobj needs to registered before the call to InitialiseComponent()
>
>I can 'make' this work by adding the instantiation to the second constructor - just wondering what the correct way to do this is?
>
>
> public ProjectEditForm()
> {
> this.oProject = (Project)this.RegisterPrimaryBizObj(new Project());
> InitializeComponent();
> }
>
> public ProjectEditForm(int projectID) : base()
> {
> this.oProject.GetProjectByID(projectID);
> }
>