string FormatEduFormYears(IEnumerable <IEduProgramProfileFormYear> eppfys) { if (eppfys != null) { var sb = new StringBuilder(); foreach (var eppfy in eppfys) { var eduFormTitle = LocalizationHelper.GetStringWithFallback( "TimeToLearn" + eppfy.EduForm.Title + ".Text", Context.LocalResourceFile, eppfy.EduForm.Title ).ToLower(); sb.AppendFormat( "<li>{0}</li>", FormatHelper.JoinNotNullOrEmpty( " – ", eduFormTitle, (eppfy.EduVolume != null) ? UniversityFormatHelper.FormatTimeToLearn(eppfy.EduVolume.TimeToLearnMonths, eppfy.EduVolume.TimeToLearnHours, TimeToLearnDisplayMode.Both, "TimeToLearn", Context.LocalResourceFile) : null ) ); } return(string.Format("<ul>{0}</ul>", sb)); } return(string.Empty); }