CSharp examples for System:String Split
Split String By Length
using System.Collections.Generic; using System;/*w ww . j a v a2 s . co m*/ public class Main{ private static List<string> SplitStringByLength(string str, int chunkSize) { List<string> list = new List<string>(); int i; for (i = 0; i < str.Length / chunkSize; i++) { list.Add(str.Substring(i * chunkSize, chunkSize)); } i = i * chunkSize; if (i < str.Length - 1) list.Add(str.Substring(i, str.Length - i)); return list; } }