Good day, I have a richTextBox with a character length of 260, now I want to distribute those 260 characters in 5 variables of type string leaving in each one 52 characters. Thanks for your help.
Good day, I have a richTextBox with a character length of 260, now I want to distribute those 260 characters in 5 variables of type string leaving in each one 52 characters. Thanks for your help.
What you want to do can be done with Substring.
Try the following code:
string myText = myRichTextBox.Text;
string part1 = myText.Substring(0, 52);
string part2 = myText.Substring(51, 52);
string part3 = myText.Substring(103, 52);
string part4 = myText.Substring(155, 52);
string part5 = myText.Substring(207, 52);