C#:文字列
参考
文字列 → char配列
string(文字列)からchar型配列 char に変換する - C#プログラミング"
文字列 ← char配列
char型配列 char からstring(文字列)に変換する - C#プログラミング"
指定文字数で分割
public static string[] SubstringAtCount( this string self, int count ) { var result = new List<string>(); var length = ( int )Math.Ceiling( ( double )self.Length / count ); for ( int i = 0; i < length; i++ ) { int start = count * i; if ( self.Length <= start ) { break; } if ( self.Length < start + count ) { result.Add( self.Substring( start ) ); } else { result.Add( self.Substring( start, count ) ); } } return result.ToArray(); }
【C#】文字列を指定した文字数で分割する拡張メソッド - コガネブログ"