I need help with creating a C# method that returns the index of the Nth occurrence of a character in a string.
For instance, the 3rd occurrence of the character 't' in the string "dtststxtu" is 5.
(Note that the string has 4 ts.)
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.
That could be made a lot cleaner, and there are no checks on the input.