Can you please help me converting below two LINQ queries (Inside foreach loops) to normal/regular C# code:
DirectoryInfo di = new DirectoryInfo(path);
try
{
DirectoryInfo[] subdirs = di.GetDirectories();
foreach (DirectoryInfo dinfo in subdirs)
{
var files = dinfo.GetFiles("*").Where(w=>(w.LastWriteTime<=DateTime.Now.AddMonths(-6))).OrderByDescending(s => s.LastWriteTime).GroupBy(e => e.LastWriteTime.Month).ToList();
foreach (var item in files)
{
SaveZip(item.Select(s=>s).ToList());
}
}