I have an array of string . I want to remove an item from string. HOw i can do this.
string []values = User.Split(';');
Suppose values contains "1","2","3","4"
I want to delete or remove item "2" from values. How i can do this. Is there built in function in C#
尝试这个:
myArray = myArray.Where(w => w != myArray[2]).ToArray();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.