I have to call a function recursively using foreach something like this
public JsonResult GetPath(string node)
{
try
{
var project_id = "abc";
String fName = "";
String fID = "";
foreach (string items in GetFolders(project_id, node))
{
for (int j = 0; j < items.Length; j++)
{
if (items.Length == 100000)
{
break;
}
else
{
var Totalitems = items.Split('~');
folderID = Totalitems[0].ToString();
FolderName += Totalitems[1].ToString()+",";
}
}
GetPath(items);
}
}
catch(Exception)
{
}
return Json("", JsonRequestBehavior.AllowGet);
}
In this method this GetFolders will return and array
Problem is i cant declare string array in foreach

Nilesh ShahRank #42 · 34.2K reputationPosted Jun 1, 2017, 7:45 AM EDT
Nilesh ShahRank #42 · 34.2K reputationPosted Jun 6, 2017, 9:19 AM EDT
JohnRank #2,322 · 608 reputationPosted Jun 6, 2017, 11:12 PM EDT