public MediaCount UpdateMediaCount() { TotalMediaCount = MediaCount = new MediaCount(Files.Count(file => file is ImageFile), Files.Count(file => file is VideoFile)); SubFolders.ForEach(folder => TotalMediaCount += folder.UpdateMediaCount()); return(TotalMediaCount); }