private Tuple<string, string> GetImages(SportType sport ) { var frontTile = string.Format(FrontImagePath, sport.ToString()); var backTile = string.Format(BackImagePath, sport.ToString()); return Tuple.Create(frontTile, backTile); }
public string getType(int value) { SportType objSportType = (SportType)value; return(objSportType.ToString()); }
/// <summary> /// Get sport type as a string. /// </summary> /// <param name="sport">SportType enum to convert</param> /// <returns>SportType as a string</returns> public static string ToString(this SportType sport) { DescriptionAttribute[] attributes = (DescriptionAttribute[])sport.GetType().GetField(sport.ToString()).GetCustomAttributes(typeof(DescriptionAttribute), false); return(attributes.Length > 0 ? attributes[0].Description : string.Empty); }
public static string ToStringFull(this SportType value) { return(value.ToString().Replace("_", " ")); }