string Join
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
string tys = ""; for (int i = 0; i < typeList.Count; i++) { if (typeList[i] != -1) { tys = typeList[i] + ","; } else { tys = ""; break; } } tys = tys.TrimEnd(','); tys = typeList.Contains(-1)?"":string.Join(",",typeList);
string tys = ""; for (int i = 0; i < typeList.Count; i++) { if (typeList[i] != -1) { tys = typeList[i] + ","; } else { tys = ""; break; } } tys = tys.TrimEnd(','); tys = typeList.Contains(-1)?"":string.Join(",",typeList);