That will be very expensive. About the only way to do this would be to read the entire file and count the number of lines. Lets imagine there are 5 lines. Then read the entire file again up to line...