I'm trying out the following code:
public partial class Test: Window
{
public Test(ref List</* Type */> LList)
{
[...]
this.ListField = LList;
}
private List</* Type */> ListField;
}
C# doesn't save a reference in "ListField". Example:
Test test = new Test(ref /* List</* Type */>-variable*/)
---------
public partial class Test: Window
{
public Test(ref List</* Type */> LList)
{
[...]
this.ListField = LList;
}
private List</* Type */> ListField;
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
ListField = null;
}
}
After having closed the form the Object given to public Test(ref List</* Type */> LList)
has not changed (it's not "null").
SO how ca I save A reference in "ListField"?