![]() |
List.Remove(T) Method is used to remove the first occurrence of a specific object from the List. Properties of List:
Syntax: public bool Remove (T item); Parameter:
Return Type: This method returns True if item is successfully removed. Otherwise it returns False. Note: This method returns False if item was not found in the List. Below programs illustrate how to remove the specified element from the List: Example 1:
Output: Before Removing 1 2 3 4 After Removing 1 3 4 Example 2:
Output: Before Removing 1 2 3 4 2 4 After Removing 1 3 4 2 4 Reference: |
Reffered: https://www.geeksforgeeks.org
C# |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 9 |