How to remove the last element added into the List?

前端 未结 6 1211
耶瑟儿~
耶瑟儿~ 2020-12-18 17:40

I have a List in c# in which i am adding list fields.Now while adding i have to check condition,if the condition satisfies then i need to remove the last row added from the

6条回答
  •  旧时难觅i
    2020-12-18 18:26

    I think the most efficient way to do this is this is using RemoveAt:

    rows.RemoveAt(rows.Count - 1)
    

提交回复
热议问题