What is the problem here? For some reason, the method EditInfo does not change the values of variables.
struct Address
{
public string id;
public string addressline;
public string postalcode;
public Address(string[] data)
{
this.id = data[0];
this.addressline = data[1];
this.postalcode = data[2];
}
public void EditInfo(string field, string newdata)
{
Type myType = typeof(Address);
myType.GetField(field).SetValue(this, newdata);
}
}