Question : Not all codes paths return a value

I'm trying to pass a string to a function and have it do some "stuff" and return me a new string.
From my code it seems I have catered for all events but apparently not.
any ideas?
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
public string SplitMethods(string strMethods)
    {
        string returnedMethods = strMethods;

        if (returnedMethods != "")
        {
        string[] arInfo = new string[1];

        // define which character is seperating fields
        char[] splitter = { ';' };

        arInfo = strMethods.Split(splitter);

        


        for (int x = 1; x < arInfo.Length; x += 2)
        {
            returnedMethods = string.Concat(arInfo[x].Replace("#", ""), "<br />") ;
            return returnedMethods;
        }
        }
        else
        {
            returnedMethods = "";
            return returnedMethods;
        }
    }
    }

Answer : Not all codes paths return a value

I'm not sure I fully understand how that relates or the whole context, but this function returns in <br/> delimited form, every 2nd entry in a string of the form     1;#m1,2;#m2,3;#m3...

public string SplitMethods(string strMethods)
    {
        string returnedMethods = "";
        string[] parts = strMethods.Split(new char[] { ';',',','#' }, StringSplitOptions.RemoveEmptyEntries);
            for(int x=1; x<parts.Length; x+=2) {
               returnedMethods += parts[x] + "<br/>";
            }
        return returnedMethods;
    }
Random Solutions  
 
programming4us programming4us