I need help with my array. I\'m new on C# Winforms.
This is my function where the array is going, I\'m trying to post the array on XML file:
// -----
Change the signature of the method to
static void XML_Array(Dictionary<string, string> Data_Array)
since it's not a string
but a Dictionary
.
As varg and Austin have commented you should consider to rename your variables because it's confusing when an argument is names Data_Array
but actually it is a Dictionary
what is a completely different type of collection. You probably want to add the Text
property of an existing TextBox
control, not the string literal(with quotes) "textBox3.Text"
.
Data_Array.Add("Name", textBox3.Text); // Alex
Data_Array.Add("Year", textBox4.Text); // 1988
TextBox3
and TextBox4
are also good candidates for new names.