SelectTopFrom method gets the top rows from dataview or datatable

public static DataTable SelectTopFrom(DataTable dt, int rowCount)
    {
        DataTable dtn = dt.Clone();
        for (int i = 0; i < rowCount; i++)
        {
            dtn.ImportRow(dt.Rows[i]);
        }
        return dtn;
    }
   
    public static DataView SelectTopFrom(DataView dv, int rowCount)
    {
        DataTable dt = CreateTable(dv);
        DataTable dtn = dt.Clone();
        for (int i = 0; i < rowCount; i++)
        {
            dtn.ImportRow(dt.Rows[i]);
        }
        DataView dvn = new DataView(dtn);
        return dvn;
    }

I forgot to write "CreateTable" method above, you can look at it in the snipped named "Convert DataView To DataTable".
I think it is better to seperate these two snippets

The article starter has earned a lot of community kudos, and such articles offer a bounty for quality replies.