Mark said:
I don't know -- when you're just concatenating strings, + (or Concat) is
more readable, IMO.
///ark
I think it depends on what you are doing:
version #1:
string sql = "";
sql = "Insert Into Foo (custid, salary, bar, snoopy, bugs)"
+ " values (" + m_custid + ", " + m_sal + ", '" + m_bar + "', '"
+ m_snoopy + "', '" + m_bugs + "')";
version #2
// this string would probably be defined somewhere else
string sqlIns = Insert Into Foo (custid, salary, bar, snoopy, bugs)"
+ " values ({0}, {1}, '{2}', '{3}', '{4}')";
string sql = String.Format(sqlIns, m_custid, m_sal,
m_bar, m_snoopy, m_bugs);
I think version #2 is the cleanest.
Jim
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
You roll an 18 in Dex and see if you
don't end up with a girlfriend
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
JimD
Central FL, USA, Earth, Sol