Ok so I have made a DataSet that reads the data hardcoded but unsure how I can read input from user to replace that hardcoded data.
I have a form with a textbox and submit button, I want to save data to xml after going through my DataSet.
Kinda new to programming, hoping someone can give me some pointers here.
public partial class Form1 : Form
{
// DataSet
DataSet ds = new DataSet();
DataColumn email = new DataColumn();
public Form1()
{
InitializeComponent();
email = new DataColumn("Email", Type.GetType("System.String"));
ds.dt.Rows.Add(0, "my_email");
ds.dt.Rows.Add(1, "my_email");
var results = from myRow in ds.dt
orderby myRow.id
where myRow.id == 0
select myRow;
foreach (var item in results)
{
ds.dt.WriteXml("email.xml");
}
}
}