public IEnumerator <string> GetEnumerator() { // Display either a string representation for each column or N/A if empty yield return(Year == 0 ? "N/A" : Year.ToString()); yield return(Honor.Length < 1 ? "N/A" : Honor); yield return(Name.Length < 1 ? "N/A" : Name); yield return(Country.Length < 1 ? "N/A" : Country); yield return(Birth_Year == 0 ? "N/A" : Birth_Year.ToString()); yield return(DeathYear == 0 ? "N/A" : DeathYear.ToString()); yield return(Title.Length < 1 ? "N/A" : Title); yield return(Category.Length < 1 ? "N/A" : Category); yield return(Context.Length < 1 ? "N/A" : Context); }
private string GetAnchorTitle() { string title = ""; if (Positions.Any()) { title += GetLastNoblePosition(); title += "
"; } if (!string.IsNullOrWhiteSpace(AssociatedType) && AssociatedType != "Standard") { title += AssociatedType; title += "
"; } title += !string.IsNullOrWhiteSpace(Caste) && Caste != "Default" ? Caste + " " : ""; title += Formatting.InitCaps(RaceString); if (!Deity && !Force) { title += " (" + BirthYear + " - " + (DeathYear == -1 ? "Present" : DeathYear.ToString()) + ")"; } title += "
"; title += "Events: " + Events.Count; return(title); }