Drag{ON} Game Dev
Member
- Joined
- Oct 20, 2019
- Messages
- 5
- Programming Experience
- Beginner
I need to know please?!? Thank you!
string strOld = "The dog eat my homework";
string subStr = strOld.Substring(12, 11);
string srtNew = string.Concat("I did ", subStr);
.Substring(12, 11); subStr becomes my homework. (Although, you don't have to specify the last endpoint index, if you don't want too. You could just do strOld.Substring(12);) Then srtNew = string.Concat("I did ", subStr); becomes I did my homework. string.Concat only joins the two strings "I did" and subStr together to complete the full sentence.Int32.TryParse(), and this thread's query about String.Substring() right after each other, it feels like the OP is trying to get us to do his homework for him. I feel that these are homework questions designed to make the student learn how to search, read, and understand the MSDN documentation.String.Substring Method (System) | Microsoft DocsI need to know please?!? Thank you!