rodchar,
In addition to the other comments.
| is there a difference when saying:
To the computer, no there is no real difference. Although you are calling
Split twice which may have a minor impact on performance speed & GC
pressure. Unless the statement is in a tight loop, I would expect the
performance impact & GC pressure to be relatively minor...
More importantly: To humans (including yourself in 6 months) there is a huge
difference!
I would expect most developers would find the second to be more immediately
obvious what you are trying to do, in other words the "intent of the code".
While the first reading the code one has to stop & think about what's
happening...
--
Hope this helps
Jay [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley -
http://www.tsbradley.net
| hey all,
|
| is there a difference when saying:
|
| myString= Split(_dr.TCADR1, " ")(0) & " " & Split(_dr.TCADR1, " ")(1)
|
| -or
|
| myArrary = Split(_dr.TCADR1, " ")
| myString = myArray(0) & " " & myArray(1)
|
| thanks,
| rodchar