I have 9 Forms, in every form i can fill List and i must write content of List to textBox.
I tried to make public static List<Basket> sas = new List<Basket>();
in Basket.cs , but It doesn't help.
That how i try to output
public Form1()
{
InitializeComponent();
foreach(Basket e in sas)
{
basketBox.Text += e.Name + Environment.NewLine;
}
}
I tried to do like here How to make a list of classes publicly accessible? , but it doesn't work. So, I just want to know how to use 1 List in different forms.