示例#1
0
        static void Main()
        {
            Persons pesho = new Persons("Pesho", 24, "*****@*****.**");
            Persons gosho = new Persons("Gosho", 19);

            Console.WriteLine(pesho);
            Console.WriteLine(gosho);
        }
示例#2
0
 public static void ToString(Persons person)
 {
     Console.WriteLine("Name: {0}",person.Name);
     Console.WriteLine("Age: {0}",person.Age);
     Console.WriteLine("Mail: {0}",person.Mail);
 }
示例#3
0
 static void Main(string[] args)
 {
     Persons sasho = new Persons("", 29, "*****@*****.**");
     Persons.ToString(sasho);
 }