The Module1 code looks as follows, I have tried changing to debug but to
no avail,
thanks
portroe
Module Module1
Sub Main()
Dim myCar As SportsCar
myCar = New SportsCar()
'Set the horesepower and weight too..
myCar.HorsePowe r = 240
myCar.weight = 1085
'report the details...
Console.WriteLi ne("Horsepower: " & myCar.HorsePowe r)
Console.WriteLi ne("Weight" & myCar.weight)
'report the number of doors...
Console.WriteLi ne("The number of doors is:")
Console.WriteLi ne(mycar.Number ofdoors)
'try and change number of doors to 1000
mycar.Numberofd oors = 1000
'report the number of doors
Console.WriteLi ne("The number of doors is:")
Console.WriteLi ne(mycar.Number ofdoors)
'try change number of doors to 2
mycar.Numberofd oors = 2
'report the number of doors
Console.WriteLi ne("The number of doors is:")
Console.WriteLi ne(mycar.Number ofdoors)
'Report the speed
Console.WriteLi ne("The cars speed is:")
Console.WriteLi ne(mycar.Speed)
'accelerate
mycar.accelerat e(5)
'Report the new speed
Console.WriteLi ne("The Car's speed is Now:")
Console.WriteLi ne(mycar.Speed)
'set the color property to "Red" ...
mycar.color = "Red"
'show what the value of the property is...
Console.WriteLi ne("My car is this color:")
Console.WriteLi ne(mycar.color)
'Display the details of the car...
DisplayCardetai ls(mycar)
'Wait...
Console.ReadLin e()
End Sub
'Displaycardeta ils - function that displays a car details...
Function DisplayCardetai ls(ByVal myCar As Car)
'display the details of the car...
Console.WriteLi ne("Color:" & myCar.Color)
Console.WriteLi ne("Number of doors:" & mycar.numberofd oors)
Console.WriteLi ne("Current speed:" & myCar.Speed)
Console.WriteLi ne()
End Function
End Module
Herfried K. Wagner [MVP] wrote:
* portroe <bo*@sleigh.com > scripsit:
I am using console.Writeli ne in my simple program. I do not however
see anything happening in the output window when I debug,
Use 'Debug.WriteLin e' instead. Or create a project of type "Console
Application" (you can change the type of an application after creating
it in the project properties).