I am trying to use a LINQ function to assign to variable. I have list that looks something like the list below:
I want to split each item using “\” as the delimiter and keep only the first element. Using the input list above, I am trying to get the following output below:
Any help is appreciated.
You can try with Regex expression ?
You can try with split expression also
Can you try the following expression?
resultList = yourList.Select(Function(s) s.Split("\"c).First).Distinct().ToList()
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.