Код: Выделить всё
using System;
using System.Collections.Generic;
int a = 50;
int b = a;
List listOne = new List { 20, 30, 40 };
List listTwo = listOne;
listTwo.Add(50);
Console.WriteLine($"A is {a} and B is {b}, a, b);
Console.WriteLine($"List One {listOne} and List Two {listTwo}");
Console.ReadLine();
Подробнее здесь: https://stackoverflow.com/questions/797 ... e-writelin
Мобильная версия