Click here to Skip to main content
15,921,174 members

Comments by fatand50 (Top 17 by date)

fatand50 18-Apr-13 17:13pm View    
I now understand, thank you Sir. I can count the number of lines by printing the count but do not know how to validate :(
fatand50 18-Apr-13 17:03pm View    
Sorry Sir, What is a over-kill?
fatand50 18-Apr-13 16:42pm View    
Okay let me try. Thank you.
fatand50 18-Apr-13 16:30pm View    
Yes but how? That is the part I don't know or that I've never encountered. I really need to know how to do this.
fatand50 18-Apr-13 16:28pm View    
It's on top before the code. But here it is:
Write a static method, Display() that accepts a string representing the name of the file. The method should read and display only the first the five lines of the file's contents. If the file contains less than 5 lines, it should display the file's entire contents.