public static void Main(string[] args)
PrintPersonInfo(("Tom", 23));
var user = GetUser("admin", "qwerty");
Console.WriteLine(user.Item1);
Console.WriteLine(user.Item2);
var tuple = GetArrayData(new int[] { 1, 2, 3, 4, 5, 6, 7 });
Console.WriteLine(tuple.count);
Console.WriteLine(tuple.sum);
SummerMonth month = SummerMonth.July;
Color orange = Color.Red | Color.Yellow;
Seasons season = (Seasons)3;
int monthValue = (int)month;
int colorValue = (int)orange;
for (int i = 0; i <= 8; i++)
Console.WriteLine("Счётчик: {0}, Цвет: {1}", i, (Color)i);
for (Color i = Color.Black; i <= Color.White; i++)
Console.WriteLine("Счётчик: {0}", i);
Person person1 = new Person();
Person person2 = new Person("Дмитрий");
Person person3 = new Person("Мария", 20);
private 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];
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