For your first problem, reading from a .csv file, here's a link that shows how to read from a .CSV file. This example will store what it reads from your .csv file into a collection (a string array) called Fields
. You could easily store it in a data table. That way, you can step through each row of the data table and write it out to your DB2 database.
Now, the second part of your problem, writing to a DB2 table, depends on what technology you'd like to use. LINQ, Entity Framework, T-SQL, etc. You need to read up on these to figure out how to take your collection of data and write it out to a DB2 database. There are tons of tutorials online and quite a few good ones on YouTube.
What you're attempting to do is easy enough, but only with understanding each part of the problem, with regards to how to leverage C# to solve the problem. Please try to go one step-at-a-time. Learning C# can be daunting if you try to rush it. Take your problem, make a list of each step that you want to accomplish, and go from there.