コード例 #1
0
        static void Main(string[] args)
        {
            NewPerson Gosho = new NewPerson();
            Gosho.Age = 18;
            Gosho.Email = "*****@*****.**";
            Gosho.Name = "Gosho";

            NewPerson Pesho = new NewPerson("Pesho", 20, "*****@*****.**");
            NewPerson Tosho = new NewPerson("Tosho", 34, "*****@*****.**");

            Pesho.PrintPersonData();
            Gosho.PrintPersonData();
            Tosho.PrintPersonData();

            Console.WriteLine(Pesho);
            Console.WriteLine("We created ");

        }
コード例 #2
0
 public static void PrintInfo(NewPerson person) 
 {
     Console.WriteLine("Person name is: " + person.Name);
     Console.WriteLine("Person age is: " + person.Age);
     Console.WriteLine("Person e-mail is: " + person.Email);
 }