Answers for "remove the last element from the list in c#"

C#
3

c# remove last value from list

if(rows.Any()) //prevent IndexOutOfRangeException for empty list
{
    rows.RemoveAt(rows.Count - 1);
}
Posted by: Guest on March-03-2020

Code answers related to "remove the last element from the list in c#"

C# Answers by Framework

Browse Popular Code Answers by Language