dim myGraphicsPath as graphicsPath
myGraphicsPath = new GraphicsPath()
is this more easily written as...
dim myGraphicsPath as New GraphicsPath
????????????????????????????????
seems like the same to me anyway.
Printable View
dim myGraphicsPath as graphicsPath
myGraphicsPath = new GraphicsPath()
is this more easily written as...
dim myGraphicsPath as New GraphicsPath
????????????????????????????????
seems like the same to me anyway.
Yes.
thanks!
Well , yes the same but not 100% the same . Consider this :Quote:
Originally posted by thephantom
dim myGraphicsPath as graphicsPath
myGraphicsPath = new GraphicsPath()
is this more easily written as...
dim myGraphicsPath as New GraphicsPath
????????????????????????????????
seems like the same to me anyway.
CLR do this :VB Code:
dim myGraphicsPath as graphicsPath myGraphicsPath = new GraphicsPath()
1-Reserve memory for myGraphicsPath and assign it a name .
2-Here , myGraphicsPath is actually created and filled in the memory allocated and ready to be accessed .
1-Reserve memory , assigne it a name , and immediately create the object inside it .VB Code:
dim myGraphicsPath as New GraphicsPath
This made some performance problems in previous VB versions but as MS says , it's optimized in .NET .
Personally , I like one-step declaration .