Hello Anil ,
Dim temp() as String
is the classic VB syntax to declare an array
VB also supports
Dim temp as String()
This method is more intuitiv to programmers with a C background , this
is also a big advantage for coders who both use C# and VB
in early versions of VB.Net ( 2002 and i guess 2003 i believe , but i am
not sure ) there was a difference
Between the two the new method could not be used to declare and
instantiate the array in one line
Dim temp() as String ={"hello","world"} worked but Dim temp as
String()={"hello","world"} did not work in early versions
Nowadays in VB.Net 2005 and 2008 both work the same so it becomes a
mather of taste wich one of the 2 you use
as you see the VB language also evolves in a forward kind of way
I concur with Onur regarding his remark that you see more and more "Dim
temp as String()"in code examples on the net
HTH
Michel Posseth [MCP]
http://www.vbdotnetcoder.com
"Anil Gupte/iCinema.com" <
[email protected]> schreef in bericht
Can someone please explan the difference between
Dim temp as String()
and
Dim temp() as String
in terms of syntax and practical usage? I thought I knew, but of late
have become confused due to reasons too complicated to go in here.
Will appreciate your inputs.
--
Anil Gupte
www.keeninc.net
www.icinema.com
www.wizo.tv