Exemple #1
0
        public static string GetShortName(this Prefecture pref)
        {
            var attr = pref.GetType().GetField(pref.ToString()).GetCustomAttribute <PrefectureNameAttribute>();

            if (attr == null)
            {
                return("不明");
            }
            return(attr.ShortName);
        }
Exemple #2
0
 public override string ToString()
 {
     return(Province?.ToString() + Prefecture?.ToString() + County?.ToString()
            + Township?.ToString() + Village?.ToString() + ResidentialGroup?.ToString()
            + Detail);
 }