I have a list string which has values like below, could you please let me know how to split the list by every 2 character and insert a comma separated and assign the final list to another list.
var list1 = new List<string>() {"DVMNKL"};
var list2 = new List<string>() {"DV","MN","KL"};
Some time list1
can have only 2 character, at that time I should not split, I have to just assign to list2
You can use
System.Linq
to manage that.the output