0


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.....

3
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by Panithuli
0

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...

0

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.

0

thanks for the help::)

ya i did as this :

Private FuelLevel As Double
 Public Sub New()
  FuelLevel = 0
End Sub
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.