I am kinda confused by the way i am seeing objects created in vb.net.
In VB there was late and early binding
VB Code:
Dim MyObj as Object Set MyObj = New Object 'would be late binding Dim MyObj as New Object 'would be early binding
But in .Net i've notice some odd ways of creating an object.....examples
VB Code:
Dim TheFont As Font = New Font("Times New Roman", 24, System.Drawing.GraphicsUnit.Point) ' i dont get it. Dim the font as font = New Font.... Dim TheGraphic As Graphics = Graphics.FromImage(TheImage)' same thing here except no NEW keyword....huh? TheGraphic.DrawString(TheText, TheFont, New SolidBrush(Color.FromArgb(Red, Green, Blue)), 0, 0) ' Creating a new object as a paramter of a function? never seen this before either.
Can anyone enlighten me a little.
Thanks!![]()





Reply With Quote