/// <summary> /// Converts the value of the specified <see cref="NycPublicOfficeType"/> to its equivalent <see cref="String"/> representation. /// </summary> /// <param name="office">A New York City publicly elected office.</param> /// <returns>The <see cref="String"/> equivalent of the value of <paramref name="office"/>.</returns> public static string ToString(NycPublicOfficeType office) { switch (office) { case NycPublicOfficeType.BoroughPresident: return("Borough President"); case NycPublicOfficeType.CityCouncilMember: return("City Council Member"); case NycPublicOfficeType.Comptroller: return("Comptroller"); case NycPublicOfficeType.Mayor: return("Mayor"); case NycPublicOfficeType.PublicAdvocate: return("Public Advocate"); case NycPublicOfficeType.Undeclared: return("Undeclared"); default: return(string.Empty); } }
/// <summary> /// Declares a Borough President of New York City. /// </summary> /// <param name="borough">The borough presided over.</param> public NycPublicOffice(NycBorough borough) { _type = NycPublicOfficeType.BoroughPresident; _borough = borough; }
/// <summary> /// Initializes an undeclared public office of New York City. /// </summary> public NycPublicOffice() { _type = NycPublicOfficeType.Undeclared; }
/// <summary> /// Declares a public office of New York City. /// </summary> /// <param name="type">The office type.</param> public NycPublicOffice(NycPublicOfficeType type) { _type = type; }