hello guys i am new to c# programming but i was just try to store input from the file in grid view by c# : console application and display them in grid view row and columns but i want to skip  some lines in text file then i want to start storing in grid view ....please help me out of this  ? mycode is

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;

    using System.Windows.Forms;
    using System.IO;
    
    namespace projectyj1
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
        

    InitializeComponent();
        }
    
        private void button1_Click(object sender, EventArgs e)
        {
            DataTable dt = new DataTable();
            dt.Columns.Add("time", typeof(String));
            dt.Columns.Add("active_power_avg", typeof(Int32));
            dt.Columns.Add("active_power_max", typeof(Int32));
            dt.Columns.Add("active_power_min", typeof(Int32));
    

    using (StreamReader sr = new StreamReader(@"D:\Data\mean\yo1.txt"))
        {
            String line;
            while ((line = sr.ReadLine()) != null)
            {
                string[] parts = line.Split(';');
                var row = dt.NewRow();
                for (int i 

    = 0; i < parts.Length; i++)
                    {
                        row[i] = parts[i];
                    }
                // important thing!
                dt.Rows.Add(row);
            }
            sr.Close();
        }

> Blockquote
