求各位大神帮帮忙,该如何解决

求各位大神帮帮忙
怎么将foreach中循环时的depotid给弄到 not in 里面

foreach(GridViewRow rows in Gridview1.Rows)
{
string depotid=((Lable)rows.FindControl("Lable1")).Text;
 

 depotid not in('“+ depotid +”');


}
------解决思路----------------------
string notIn="";
foreach(GridViewRow rows in Gridview1.Rows)
{
string depotid=((Lable)rows.FindControl("Lable1")).Text;
 

 notIn+= ","+depotid; 
}
if(notIn.Length>0)
{
    notIn = notIn.Trim(",");
}