You want to formulate that a bit differently, and you have a typo. Assuming that you want to keep the list of anonymous objects around this method will work::
var getdata = dm.Cloths.Where(w => w.Cloth_No == txtvalue).Select(w => new { w.Cloth_Name, w.Cloth_Type }).ToList();
if (getdata.Any())
{
var sb = new StringBuilder();
foreach(var item in getdata)
{
sb.Append(item.Cloth_Name + " : " + item.Cloth_Type + "\n");
}
MessageBox.Show(sb.ToString());
}