Best way to remove the first two characters from every string value in a list?

Currently I have a list with two leading characters that I can’t have. For example: XX1231,XX1222,XX1311 and so on. Currently I have a for each set to go through every one and substring out the first two characters, but it’s quite slow considering it’s a list of 9000. Is there a quicker way to do this?


Try this

Listvar.Select(function(x) x.SubString(2)).ToList

Hope this helps



Wow awesome thanks.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.