Hi,
I have a problem converting a class into a structure.
I have this module:
And this line of Code: If newCustomerForm.Customer IsNot Nothing Then -- that draws an error on the IsNot Nothing
I think it should be checking for a Null, but can't get the syntax correct.
The reason is in the class it is instantiated as a reference, where as in the structure it is a value
Any help would be appreciated
Thanks in advance...
I have a problem converting a class into a structure.
I have this module:
Code:
Private Sub btnAdd_Click(sender As Object, e As EventArgs) Handles btnAdd.Click
Dim newCustomerForm As New frmAddCustomer
newCustomerForm.ShowDialog()
If newCustomerForm.Customer IsNot Nothing Then
customers.Add(newCustomerForm.Customer)
CustomerDB.SaveCustomers(customers)
Me.FillCustomerListBox()
Else
MessageBox.Show("btnAdd Click not have data...", "Customer form error...")
End If
End SubI think it should be checking for a Null, but can't get the syntax correct.
The reason is in the class it is instantiated as a reference, where as in the structure it is a value
Any help would be appreciated
Thanks in advance...