Link to home
Start Free TrialLog in
Avatar of learningnet
learningnet

asked on

class instance

hello experts

i wanted to set the instance of this customerdetailclass based on learnit value
i tried the following and am getting errors

 If learnIt Then
    Dim ContactDetails As New CustomerDetailsClass(ContactTitle, txtContactFirstName.Text,,,,,,)
 else
    Dim ContactDetails As New CustomerDetailsClass(ContactTitle, txtContactFirstName.Text,,,,,,)
 end if

 Can I not use like this?

 Dim ContactDetails As New CustomerDetailsClass
 if learnt then
  ContactDetails = ContactDetails(ContactTitle, txtContactFirstName.Text,,,,)
 else
  ContactDetails = ContactDetails(ContactTitle, txtContactFirstName.Text,,,,)
end if

please advise
thanks
 
 
ASKER CERTIFIED SOLUTION
Avatar of Bane83
Bane83
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Toms Edison
Toms Edison
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial