Part 76 Working with generic list class and ranges in c#

Описание к видео Part 76 Working with generic list class and ranges in c#

Tags
c# remove all elements from list
c# list clear
c# list add multiple items at once
add list of items to list c#
c# list insertrange
insert a list into a list c#
c# list removerange example
c# list remove range
c# list add another list
c# list getrange example
add list of objects to list c#
list addrange method c#

C#, SQL Server, WCF, MVC and ASP .NET video tutorials for beginners
https://www.youtube.com/user/kudvenka...

Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our YouTube channel. Hope you can help.
   / @aarvikitchen5572  

AddRange() - Add() method allows you to add one item at a time to the end of the list, where as AddRange() allows you to add another list of items, to the end of the list.

GetRange() - Using an item index, we can retrieve only one item at a time from the list, if you want to get a list of items from the list, then use GetRange() function. This function expects 2 parameters, i.e the start index in the list and the number of elements to return.

InsertRange() - Insert() method allows you to insert a single item into the list at a specificed index, where as InsertRange() allows you, to insert another list of items to your list at the specified index.

RemoveRange() - Remove() function removes only the first matching item from the list. RemoveAt() function, removes the item at the specified index in the list. RemoveAll() function removes all the items that matches the specified condition. RemoveRange() method removes a range of elements from the list. This function expects 2 parameters, i.e the start index in the list and the number of elements to remove. If you want to remove all the elements from the list without specifying any condition, then use Clear() function.

Комментарии

Информация по комментариям в разработке