You can use a simple for loop to iterate over the usefulSkillList and check if each list is empty. Once you find a non-empty list, you can return its index. Here's an example:

int lowestIndex = -1;

for (int i = 0; i < usefulSkillList.Length; i++)
{
    if (usefulSkillList[i].Count > 0)
    {
        lowestIndex = i;
        break;
    }
}

// lowestIndex contains the index of the first non-empty list, or -1 if all lists are empty

In this example, lowestIndex will contain the index of the first non-empty list encountered during the loop. If all lists are empty, the value of lowestIndex will remain as -1

var usefulSkillList = new Liststring3 new Liststring new Liststring new Liststring ;now after usefulSkillList is fill with items how to find the lowest index of usefulSkillList that its list is not e

原文地址: https://www.cveoy.top/t/topic/hUDF 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录