Bas Cost Budde <b.*********@dev.null.comwrote in
news:ef**********@localhost.localdomain:
"Good programming" is likely to evoke opinions--which may well be
what you want.
Coding is a means to me, not an end. So in this case, I seldom
explicitly convert to a string. If I want something to be
formatted, yes. If I want to be sure there is no extra space, I
mostly use Format() without format string.
But Cstr() only takes a little extra time here, without supplying
value. Maybe, all this said, leaving the expression as is is the
best.
I think it's always best to explicitly coerce values:
1. if you don't, the results may be unexpected (though string
coercion is probably the safest of all).
2. you're dependent on changes in behavior of the way coercion may
work in the same code run on future versions of VB.
3. explicit coercion shows that you've considered what's going on,
and makes the code easier for another programmer to read.
4. having a policy of explicit coercion makes you think more about
implicit coercion and, in my opinion, makes you a better coder for
doing that extra thinking -- you're more likely to catch possible
errors if you're in the habit of never depending on implicit
coercion.
--
David W. Fenton
http://www.dfenton.com/
usenet at dfenton dot com
http://www.dfenton.com/DFA/