Re: String() declaration?
- From: "Cor Ligthert[MVP]" <notmyfirstname@xxxxxxxxx>
- Date: Fri, 31 Oct 2008 09:05:19 +0100
Michel,
There is in my idea more in C# from VB then is told to the C type
programmers, the reason is of course obvious, how do you get the Java
programmer over the border.
Don't forget that C# is the number 3 language for Microsoft.
I use both languages, but prefer VB because it is a living language while C#
has for me more the effects from Latin.
But it is true, C# is simpler and as I wrote above more static in is
progress and therefore easier to use in books or to learn programming.
jmo
Cor
"Michel Posseth [MCP]" <MSDN@xxxxxxxxxxx> schreef in bericht
news:%23ldnsSyOJHA.1744@xxxxxxxxxxxxxxxxxxxxxxx
Hello Cor,
With VB 2008 it is in my idea more and more
Dim temp() ={"hello","world"}
Well i guess that the infer options are not yet so wide spread at the
common programmers , i hear a lot of huhs ? when one of my peers opens one
of my new created projects and encounters code where i skipped the type
declaration and used inference to do this for me .
And it becomes a Complete party of HUHS ?? !!! when they open my projects
where i use LINQ to XML and see that i do in a few lines of code where
they coded multiple complete methods for to do the same .
But it just might be the future standard if the common coder wakes up and
sees there is a new kid to play with in town , Currently however you see
the most the classic syntax followed by the "New" C style syntax probably
just because it is more known .
Wich gives me the second thought ,,, is the new C style syntax beeing
addopted by the VB comunity because more and more VB coders also code C#
or is the new syntax the new standard in teaching books / courses , or is
it so that more and more C style proggers use VB .
regards
Michel
"Cor Ligthert[MVP]" <Notmyfirstname@xxxxxxxxx> schreef in bericht
news:efGM1wrOJHA.4700@xxxxxxxxxxxxxxxxxxxxxxx
Michel,
With VB 2008 it is in my idea more and more
Dim temp() ={"hello","world"}
You probably don't agree this with me, but I have the meaning that as
less you have to write and let done by the computer the better.
The effect is the same. It is a complete early binded array of strings.
Cor
"Michel Posseth" <msdn@xxxxxxxxxxx> wrote in message
news:eVu$I1nOJHA.3748@xxxxxxxxxxxxxxxxxxxxxxx
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" <anil-list@xxxxxxxxxxx> schreef in bericht
news:uAROveZOJHA.2100@xxxxxxxxxxxxxxxxxxxxxxx
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
.
- References:
- String() declaration?
- From: Anil Gupte/iCinema.com
- Re: String() declaration?
- From: Michel Posseth
- Re: String() declaration?
- From: Cor Ligthert[MVP]
- Re: String() declaration?
- From: Michel Posseth [MCP]
- String() declaration?
- Prev by Date: Re: Timer Control query
- Next by Date: Re: Timer Control query
- Previous by thread: Re: String() declaration?
- Next by thread: Re: String() declaration?
- Index(es):
Relevant Pages
|