|
namespace TestHarnessPart2
{
using System.Collections.Generic;
using System.Linq;
class WhereSelect
{
List<string> bookList = new List<string>() { "Einstein: His Life and Universe", "Ideas And Opinions", "The World As I See It " };
public IEnumerable<string> GetBookListWhichLengthIsGreaterThan(int lengthOfTheBookName)
{
//return bookList.Where(book => book.Length == lengthOfTheBookName).Select(book => book);
return bookList.Where(book =>
{
var currentBook = book;
return book.Length > lengthOfTheBookName;
}).Select(book =>
{
var currentBook = book;
return book;
});
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.