I am doing something as follows..
querybuilder = ("SELECT Type, Text FROM [Element] WHERE Id IN( ");
foreach (var item in CaseIdList)
{
querybuilder += item + ",";
}
querybuilder += ")";
at the last insdie the closing bracket I am getting a comma. How to remove that.
use
TrimEnd(',');to remove last comma from the string,string.TrimEndAfter the foreach loop use:
Instead of concatenating string, you may use StringBuilder class.