שלום לכולם....
אשמח לעזרה בשאלה שיש לי :
בניתי פונקציה רקורסיבית פשוטה בC# שאמורה לבצע היפוך STRING ואני מקבל שגיאה של "יש מקומות שלא מחזירים ערך" 'ConsoleApplication1.TestMyIntArr.flip(string, string, int)': not all code paths return a value
ואני די בטוח שהפונקציה בסדר
הקוד מצורף ואשמח לעזרה תודה
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
public class TestMyIntArr
{
static string flip(string a,string b,int c)
{
if (c == a.Length)
return b;
else
{
b += a[a.Length - c];
c++;
flip(a, b, c);
}
}
public static void Main(string[] args)
{
int count = 0;
string name,flipname=null;
Console.WriteLine("Please Enter Your Name \n");
name = Console.ReadLine();
Console.WriteLine(flip(name,flipname,count));
}
}
}



