|
|
|
VB.NET supports the creation of arrays on-the-fly, by using the New operator. For example, look at the following code, that uses GDI methods to display few connected lines |
The points array is used only to pass an argument to the DrawLines method. Here's how you can get rid of its explicit declaration: |
Click here to copy the following block | Dim gr As Graphics = Me.CreateGraphics
gr.DrawLines(Pens.Black, New Point() {New Point(10, 10), New Point(100, 80), _ New Point(200, 20), New Point(300, 100)})
gr.Dispose |
|
|
|
Submitted By :
Nayan Patel
(Member Since : 5/26/2004 12:23:06 PM)
|
|
|
Job Description :
He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting. |
View all (893) submissions by this author
(Birth Date : 7/14/1981 ) |
|
|