Hi,
Was just reviewing some code from a MS book and something doesn't look right. First of all the system.drawing class is used but from the looks of things the code is being run in a console app. You can't draw inside a command prompt, you don't even get the system.drawing class inside a console app. Also was just wondering what the { } means in the code line below that reads ("Point X {0}, Y {1}", p.X, p.Y)".
Was just reviewing some code from a MS book and something doesn't look right. First of all the system.drawing class is used but from the looks of things the code is being run in a console app. You can't draw inside a command prompt, you don't even get the system.drawing class inside a console app. Also was just wondering what the { } means in the code line below that reads ("Point X {0}, Y {1}", p.X, p.Y)".
Code:
Dim p As New System.Drawing.Point(20, 30)
' Move point diagonally
p.Offset(-1, -1)
Console.WriteLine("Point X {0}, Y {1}", p.X, p.Y)