最佳答案
我有一个foreach
循环,当从List
中选择最后一项时,需要执行一些逻辑,例如:
foreach (Item result in Model.Results)
{
//if current result is the last item in Model.Results
//then do something in the code
}
我可以知道哪个循环是最后没有使用循环和计数器吗?