have to do this


The constructor for the class should set the initial fuel level to 0.0 L (assume all fuel amounts are in litres). You'll need to use a Private Double class field. " Private FuelLevel = 0.0 As Double ........when i do like this i that error message.....

just try this out...
Private FuelLevel As Double
FuelLevel = 0#
... i guess ur not suppose to assign where u r declaring....
not too good wid VB...sorry if nt much of help...

The constructor for the class should set the initial fuel level to 0.0

Your school assignment states clearly what you should do:

Private FuelLevel As Double

Private Sub Class_Initialize()
  FuelLevel = 0
End Sub

You can't initialize variables outside of the procedures like smile4evr said.

thanks for the help::)

ya i did as this :

Private FuelLevel As Double
 Public Sub New()
  FuelLevel = 0
End Sub
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.