void PrintOutFatBooks(List<Book> books)
{
string[] lines = new string[books.Count];
for (int i = 0; i < books.Count; i++)
{
if (books[i].Pages > 400)
{
lines[i] = String.Format("Book with more than 400 pages name is: {0}"
+", it has: {1} pages", books[i].BookName, books[i].Pages);
}
}
File.WriteAllLines(@"FatBooks.csv", lines);
}
The results print normally except it makes unwanted spaces between each of it. For example, there's the results:
Book with more than 400 pages name is: Harry Potter, it has 512 pages
Book with more than 400 pages name is: Harry Potter 2, it has 800 pages
How do I remove the big space in between 2 results (can't put a big space in between the results in stackoverflow, but there's a big space)? This is my first post in stackoverflow, so please don't be very harsh, thanks and have a beautiful day :)