Load data from specific lines in a text file into SQL using C#
===

My problem is simple yet complex.  I'm a SQL DB Developer that now has to create an SSIS package with C# code in it.  The code needs to do a few things but the components I'm having a problem with are:

1.  Reading the last line in the text file and inserting that line into columns in a SQL table.
2.  Each of the detail rows from the 2nd row to the 2nd last row need to be inserted into another table.

I'm relatively new to C# and have NO idea how to go about this.  Can someone please guide me in the right direction?