Horje
remove item from list in for loop c# Code Example
c# remove from list in foreach
myList.RemoveAll(x => x.SomeProp == "SomeValue");
c# remove item from list
list.Remove("Example String"); // Remove by value
list.RemoveAt(3); // Remove at index
list.RemoveRange(6, 3); // Remove range (removes 3 items starting at 6th position in this example)
remove item from list in for loop c#
var data=new List<string>(){"One","Two","Three"};
for(int i=data.Count - 1; i > -1; i--)
{
    if(data[i]=="One")
    {
        data.RemoveAt(i);
    }
}




Csharp

Related
how to concatenate two arrays in c# Code Example how to concatenate two arrays in c# Code Example
append 2 arrays c# Code Example append 2 arrays c# Code Example
get all classes that extend a class c# Code Example get all classes that extend a class c# Code Example
c# object to json string Code Example c# object to json string Code Example
get array from column datatable c# Code Example get array from column datatable c# Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
12