Answer the question
In order to leave comments, you need to log in
Execute lines of code from text file in C# VS?
Good time of the day. Need help!
The file contains the following lines:
table.Cell(i, 0).Range.Text = dr.GetValue(0).ToString();
table.Cell(i, 1).Range.Text = dr.GetValue(1).ToString();
table.Cell(i, 2).Range.Text = dr.GetValue(2).ToString();
table.Cell(i, 3).Range.Text = dr.GetValue(3).ToString();
table.Cell(i, 4).Range.Text = dr.GetValue(4).ToString();
int i = 0;
while (dr.Read())
// Заполнение клеток (ячеек) таблицы
{
i++;
//Добавить код выше, который сохранен в текстовом файле
}
Answer the question
In order to leave comments, you need to log in
There's a difficult task)) It is necessary during the execution of the program!
It's trash and sodomy. I'll explain why. The file contains purely sharp code, it is fashionable of course to inline it at the time of compilation. But it’s more correct to store at least in jison at least in xml and add these values \u200b\u200bin code. If this is your test task, then answer like that.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question