when you use a startIndex in a IndoexOf method if not match is found does it return -1 or your startIndex? I ran this in my code and want to make sure what I got is right.
Share
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.
It will return -1 just like in the other overload of IndexOf.
A quick way to find answers to things like this is a great little app called LinqPad, which allows you to write and run little snippets of code on the fly.