با سلام خدمت همه دوستان
یک کدی نوشتم که توی حلقه تکرار پارامتر ها رو می فرسته به یک تابع و باید در خروجی به صورت لیست نمایش بده.
تابع درست کار می کنه. ولی نمی دونم چه جوری می تونم خروجی رو به صورت لیست نشون بدم
پیغام خطای Method name expected میده
بی زحمت کمک کنید
public string getoghat(int oghat_mah,int oghat_ruz)
{
prayer prayer = new prayer();
string textBox6 = (49.7).ToString();
string textBox7 = (34.09).ToString();
prayer.month = oghat_mah;
string Month = (oghat_mah).ToString();
string Day = (oghat_ruz).ToString();
string textBox1 = prayer.MorningPrayer(byte.Parse(Month), byte.Parse(Day), double.Parse(textBox6), double.Parse(textBox7)).ToString();
return textBox1;
}
[HttpPost]
public IEnumerable<string> count_ruz(List<string> list_oghat)
{
for (int cou = 1; cou >= 10; cou++)
{
string oghat = getoghat(1, cou);
list_oghat.Add(oghat);
}
return list_oghat();
}