I have string of 9 letters.
string myString = "123987898";
I want to retrieve the first 3 letters “123”
then 2 more letters “98”
and then 4 more letters “7898”.
Which c# string function support this functionality.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use Substring:
It’s also possible to make it more complicated than necessary by using a combination of regular expressions and LINQ: