В коде, ниже, простота и выразительность языка C#. Код легко понять даже ребенку. using System ; using System . Linq ; using System . Linq . Expressions ; using System . Collections . Generic ; namespace t { class MainClass { public static void Main ( string [] args ) { Action<Product> printName = (p) => Console . WriteLine ( p . Name ); Action<Product> printTax = ( p ) => Console . WriteLine ( p . Price * Convert . ToDecimal ( 0.18 )); Action<Product> print = ( p ) => { printName . Invoke ( p ); printTax . Invoke ( p ); Console . WriteLine ( p . Price ); } ; Product . List () . Where ( x => x . Price > 0 ) . OrderBy ( p => p . Name ) . ToList () . ForEach ( print ); } } class Product { public string Name { get ; } public Decimal Price { get ; } public Product ( string name , Decimal price ) ...
t.me/perfect0sight