I would add a property for that.
public void btnGatewayMsgsClick(object sender, EventArgs e)
{
try
{
GatewayMsgIDs gmID = new GatewayMsgIDs();
gmID.DataLogFile = txtDataLogFile.Text;
gmID.Show();
}
catch (Exception ex)
{
MessageBox.Show(Constants.RT_ERROR + ex.Message, Constants.ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
the other form looks like this:
public class GatewayMsgIDs
{
private string dataLogFile = string.Empty;
public GatewayMsgIDs()
{
}
public string DataLogFile{
set{
dataLogFile = value;
}
get{}
}
}
hope this helps.