I want to remove a line or a text from my application settings . example: My.Settings.Bookmarks. here is information in my settings of Bookmarks: Name: Bookmarks | Type: System.Collections.Specialized.StringCollection | Scope: User. Can anyone help me please because it's important
Asked
Active
Viewed 630 times
0
-
The Remove() or RemoveAt() method jumps to mind. Have you tried? – Hans Passant Dec 29 '13 at 23:28
-
Yes I tried Remove() but doesn't works but RemoveAt() helped me – Nadhmi Prince Dec 30 '13 at 20:14
1 Answers
2
Here from MSDN
StringCollection.Remove
StringCollection.RemoveAt
The first one requires the string to remove, the second one the index of the string in the collection.
Suppose to have
StringCollection sCol = new StringCollection();
sCol.Add("STEVE");
sCol.Add("JOHN");
sCol.Remove("STEVE");
Really simple

Steve
- 213,761
- 22
- 232
- 286
-
Thnx, this is helpful I tried ....Remove but it doesn't work but ....RemoveAt it's help me Thnx – Nadhmi Prince Dec 30 '13 at 20:12
-
RemoveAt is better if you know the position, Remove if you know exctly the string to remove. – Steve Dec 30 '13 at 20:18