Quick question. I have a list that is populated from a list of directories. Each file contains its own name and ~ #####. I am trying to read all this into a string and not replace anything with ~ ####. #### can be a number from 1 to 6 and can be from 0 to 9. Here is the code I use:
string listItem = (listBox1.SelectedItem.ToString().Replace("~*",""));
Example:
Here223~123
Here224~2321
I cannot replace any number because I need numbers before ~
user222427
source
share