示例#1
0
 public DriverInfo(string firstName, string lastName, string shortName, DriverCategory category)
 {
     FirstName = firstName;
     LastName  = lastName;
     ShortName = shortName;
     Category  = category;
 }
示例#2
0
        /// <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>");
            }
        }