Error 1 'System.Windows.Forms.TabPage' does not contain a definition for 'Items' and no extension method 'Items' accepting a first argument of type 'System.Windows.Forms.TabPage' could be found (are you missing a using directive or an assembly reference?)
private void btnReadandPrint_Click(object sender, EventArgs e)
{
reader = new StreamReader(openFileDialog1.FileName);
ResetFile();
do
{
s += reader.ReadLine() + "";
counter++;
if (counter % 5 == 0)
{
tabPage1.Items.Add("Line" + counter + ":" + s);
s = "";
}
} while (!reader.EndOfStream);
}