I wrote the following code structure:
public Dictionary<string, Dictionary<string, Object>> file_data = new Dictionary<string, Dictionary<string, Object>>();
public Form1()
{
InitializeComponent();
Dictionary<string, Object> temporary = new Dictionary<string, Object>();
temporary.Add("content", null);
temporary.Add("droplist", false);
temporary.Add("valid_file", false);
file_data.Add("base_data", temporary);
file_data.Add("supplier_data_1", temporary);
file_data["base_data"]["droplist"] = true;
MessageBox.Show(file_data["supplier_data_1"]["droplist"].ToString());
}
I just wanted to update ["base_data"]["droplist"]
, but the code updates the ["supplier_data_1"]["droplist"]
value as well (messagebox shows true). Why is it doing that? How do I have to adapt the code that the file_data["base_data"]["droplist"]
will be changed only? The Dictionary
has to keep it's structure.