Building SQL "where in" statement from list of strings in one line?
Won't something like this work?
var inList = "(" + string.Join(", ", typeList.Select(t => "@" + t)) + ")";
Edit
Based on your comment, how about this?
var inList = "(" +
string.Join(", ", Enumerable.Range(1, argCount).Select(i +> "@type" + i)) +
")";
string dbCommand =
string.Format("select * from table where type in ({0})", string.Join(",", typeList.Select(p => "@" + p));