SchoolHierarchy.Common.Teacher.ToString C# (CSharp) Méthode

ToString() public méthode

public ToString ( ) : string
Résultat string
        public override string ToString()
        {
            StringBuilder result = new StringBuilder();
            result.AppendLine("Teacher name: " + this.Name);
            foreach (Discipline discipline in this.disciplines)
            {
                result.AppendLine(discipline.ToString());
            }
            if (this.comment != null)
            {
                result.AppendLine(string.Format("Comment: {0}", this.comment));
            }
            return result.ToString();
        }
    }