public static string GetString(ErrMsg.ID id) { string result = ""; try { result = Resources.ResourceManager.GetString(id.ToString()); } catch (Exception e) { string error = string.Format("Unable to locate requested string resource {0}", id); error += e.Message + "\n" + e.StackTrace; throw new Exception(error); } return(result); }
public static string FormatString(ErrMsg.ID id, int value) { return(String.Format(GetString(id), value)); }
public static string FormatString(ErrMsg.ID id, params object[] parameters) { return(String.Format(GetString(id), parameters)); }