repl.it
@kironroy/

lambda2

C#

No description

fork
loading
Files
  • main.cs
  • Book.cs
  • BookRepository.cs
  • main.exe
main.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using System;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LambdaTwo
{
    class Program
    {
        static void Main(string[] args)
        {
            var books = new BookRepo().GetBooks();

            var alrightBooks = books.FindAll(b => b.Price < 10);

            foreach (var book in alrightBooks)
            {
                Console.WriteLine($"{ book.Title } ${ book.Price }");
            }
        }
    }
}