public DriverInfo(string firstName, string lastName, string shortName, DriverCategory category) { FirstName = firstName; LastName = lastName; ShortName = shortName; Category = category; }
/// <summary> /// Get the text to display in the user interface. /// </summary> /// <param name="category">The <see cref="DriverCategory"/> to determine display text.</param> /// <returns>The text to display in the user interface.</returns> public static string GetDisplayText(this DriverCategory category) { switch (category) { case DriverCategory.Professional: return("Profesional"); case DriverCategory.NonProfessional: return("No profesional"); default: return("<No se encuentra el texto>"); } }