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.HorsePower = 240
myCar.weight = 1085
'report the details...
Console.WriteLine("Horsepower:" & myCar.HorsePower)
Console.WriteLine("Weight" & myCar.weight)
'report the number of doors...
Console.WriteLine("The number of doors is:")
Console.WriteLine(mycar.Numberofdoors)
'try and change number of doors to 1000
mycar.Numberofdoors = 1000
'report the number of doors
Console.WriteLine("The number of doors is:")
Console.WriteLine(mycar.Numberofdoors)
'try change number of doors to 2
mycar.Numberofdoors = 2
'report the number of doors
Console.WriteLine("The number of doors is:")
Console.WriteLine(mycar.Numberofdoors)
'Report the speed
Console.WriteLine("The cars speed is:")
Console.WriteLine(mycar.Speed)
'accelerate
mycar.accelerate(5)
'Report the new speed
Console.WriteLine("The Car's speed is Now:")
Console.WriteLine(mycar.Speed)
'set the color property to "Red" ...
mycar.color = "Red"
'show what the value of the property is...
Console.WriteLine("My car is this color:")
Console.WriteLine(mycar.color)
'Display the details of the car...
DisplayCardetails(mycar)
'Wait...
Console.ReadLine()
End Sub
'Displaycardetails - function that displays a car details...
Function DisplayCardetails(ByVal myCar As Car)
'display the details of the car...
Console.WriteLine("Color:" & myCar.Color)
Console.WriteLine("Number of doors:" & mycar.numberofdoors)
Console.WriteLine("Current speed:" & myCar.Speed)
Console.WriteLine()
End Function
End Module
Herfried K. Wagner [MVP] wrote:
* portroe <bo*@sleigh.com> scripsit:
I am using console.Writeline in my simple program. I do not however
see anything happening in the output window when I debug,
Use 'Debug.WriteLine' instead. Or create a project of type "Console
Application" (you can change the type of an application after creating
it in the project properties).