I'm not an programmer but i tried it to simplify my actual work. I have a code like below :
public partial class Mainform : Form
{
public List<string> List1 = new List<string>{"nom1","nom2"};
void Method1()
{
//Get data of items from List1
}
}
public partial class Setting : Form
{
// Here, i want to modify the List1 by adding the new item
Mainform ListToModif = new Mainform();
void MethodToModify()
{
//Modify List1
}
}
Now, i want to return to Mainform class with the List1 which is modified in Setting class to take data.
Can you tell me how i should to do ?