📜  如果列表不包含则添加 c# 代码示例

📅  最后修改于: 2022-03-11 14:49:01.594000             🧑  作者: Mango

代码示例1
if (!myList.Contains("name"))
{
    myList.Add("name");
}