Generic list class and ranges in C sharp Arabic #75



 Generic list class and ranges in C sharp Arabic #75

Suggested Videos

❑ Working with generic list class and rangers.



Working with Generic list class & Ranges

Please watch Part 74 & 73 before proceeding with this video 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 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.

IntertRange()-Insert() method allows you to insert a single item into the list at a specified 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 removers a range of elemets 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.

Follow Us

YouTube

 If you want to download pptx : click Telegram

Facebook

Twitter

Instagram

Tik Tok


إرسال تعليق

أحدث أقدم