What's the most efficient way to split string values into an array every specified number of times? For example, split by 2:
string test = "12345678";
To:
string[] test = new[] {"12", "34", "56"};
What I've tried:
double part = 2;
int k = 0;
var test = bin.ToLookup(c => Math.Floor(k++ / part)).Select(e => new string(e.ToArray()));