C# – Replace a character with nothing
Strings are immutable so this line is wrong: item.Replace(“.”,””); This returns the string after the replacement has been made, but item is unchanged. You need this: foreach (var item in listOneLines) placementOneListBox.Items.Add(item.Replace(“.”,””));