/// <summary> /// Returns the localized abbreviation for the value of direction. /// </summary> /// <param name="point">The instance of <see cref="CompassPoint"/> enum.</param> /// <param name="culture">An object that represents the culture for which the resource is localized.</param> /// <returns>Returns the localized abbreviation name.</returns> public static string GetAbbreviation(this CompassPoint point, CultureInfo culture) { var abbreviation = Resources.CompassPoints.ResourceManager.GetString(point.ToString(), culture); return(abbreviation ?? string.Empty); }
public string GetPosition() { return($"{Coordinates.X} {Coordinates.Y} {CompassPoint.ToString().First()}"); }
public static string Short(this CompassPoint compassPoint) => compassPoint == CompassPoint.None ? "?" : compassPoint.ToString().ToLowerInvariant();