Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace WorldMI
- {
- class Program
- {
- static void Main(string[] args)
- {
- Person stoyan = new Person("Stoyan", 54, 345.67M, "Koce", "Ralica", "Ivancho");
- //stoyan.Name = "Stoyan";
- //stoyan.Age = -700;
- Person koce = new Person(age: 18, name: "Koce"); // named arguments mus appear after all fixed arguments
- //koce.Name = "Koce";
- //koce.Age = 18;
- //Console.WriteLine("My name is {0}. I am {1} years old!", stoyan.Name, stoyan.Age);
- //Console.WriteLine("My name is {0}. I am {1} years old!", koce.Age, koce.Age);
- stoyan.IntroduceYourSelf();
- koce.IntroduceYourSelf();
- Console.WriteLine("The first friend of Stoyan is {0}", stoyan[0]);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement