Question: I need to write function that reverses a string that is provided in C#, I am getting an error Unreachable code detected incrementing my I++

 I need to write function that reverses a string that is

I need to write function that reverses a string that is provided in C#, I am getting an error "Unreachable code detected" incrementing my I++ in my for loop and need help fixing it.

static public string Question11 (string s) 162 163 164 165 : //create a function that returns the reverse of the input string if (s null) 166 ::return null; 168 169 170 :else 172 173 174;int[] reversednew int[length]; char[] array int length 2 2 s.ToCharArray(); array. Length; 175 for (int i - length; it+) 176: = arra reversedilength 179;string StrArr- array[i].ToString); 180 return StrArr; : 182 183 184 185 186 187

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!