示例#1
0
文件: Person.cs 项目: dIgor93/Workers
 /// <summary>
 /// Форматированый вывод данных о сотруднике
 /// </summary>
 /// <returns>Строка в формате Фамилия И.О.</returns>
 public string formatSNP()
 {
     Surname    = Surname.Trim();
     Name       = Name.Substring(0, 1).Trim();
     Patronymic = Patronymic.Substring(0, 1).Trim();
     return(String.Format("{0}.{1}.{2}", Surname, Name, Patronymic));
 }
示例#2
0
        public override string ToString()
        {
            string result = Fename + " " + Name.Substring(0, 1) + ".";

            if (Patronymic.Length > 0)
            {
                result += Patronymic.Substring(0, 1) + ".";
            }
            return(result);
        }
示例#3
0
文件: Worker.cs 项目: savalik/kip
 public string GetFIO()
 {
     return(Family + " " + Name.Substring(0, 1) + " " + Patronymic.Substring(0, 1));
 }
 public override string ToString()
 {
     return
         ($"{LastName} {FirstName.Substring(0, 1)}. {Patronymic.Substring(0, 1)}.");
 }