SyntaxFix
Write A Post
Hire A Developer
Questions
Following rokkuchan's answer, just a little upgrade:
List<string> listOfStrings = new List<string> {"abc", "123", "ghi"}; int index = listOfStrings.FindIndex(ind => ind.Equals("123")); if (index > -1) listOfStrings[index] = "def";