Copy part of a string to another string in C#
c#
Solution
// when textbox contains "ABCDEFGHIJ", the result will be "CDEFG"
string result = textBox.Text.Substring(2, 5);
Keep in mind that this will throw an exception for strings shorter than 7 characters, so you may want to add some length checks.
Problem
I'm trying to copy part of the text from text box to another string. For example if my textbox contain 10 characters, I want to copy from character 3 to character 7 to another string call TEST. How do we do it?