public string Name { get; set; }
public int Age { get; set; }
public Person(string name)
public Person(string name, int age)
Console.WriteLine("Имя - {0}, возраст - {1}", Name, Age);
White = Red | Yellow | Blue
public static void Main(string[] args)
PrintPersonInfo(("Артём Черепанов", 27));
var newuser = GetUser("nicelogin", "awesomepassword");
Console.WriteLine("Логин: {0}, пароль {1}", newuser.Item1, newuser.Item2);
int[] numbers = { 1, 5, 7, 143 };
var arrinfo = GetArrayData(numbers);
Console.WriteLine("Сумма:{0}, количество элементов: {1}", arrinfo.sum, arrinfo.count);
Color orange = Color.Red | Color.Yellow;
SummerMonth june = SummerMonth.June;
Console.WriteLine("Зима({0}) + оранжевый({1}) + июнь({2}) = {3}", (int)Season.Winter, (int)orange, (int)june,
(int)Season.Winter + (int)orange + (int)june);
for (int i = 0; i < 8; i++)
Console.WriteLine("{0} - {1}", i, (Color)i);
for (Color i = Color.Black; i <= Color.White; i++)
Person student = new Person("Вика");
Person teacher = new Person("Валерий Альбертович", 54);
student.Name = "А я теперь не Вика";
static void PrintPersonInfo((string name, int age) person)
Console.WriteLine("Имя: {0}, возраст - {1}", person.name, person.age);
private static (string, string) GetUser(string login, string password)
var user = (login, password);
private static (int sum, int count) GetArrayData(int[] numbers)
var result = (sum: 0, count: numbers.Length);
for (int i = 0; i < numbers.Length; i++)
result.sum += numbers[i];