Advertisement
konalisp

lambdapark.cs

Jul 31st, 2014
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.51 KB | None | 0 0
  1. using System;
  2.  
  3. class TestClass {
  4.     static int Main( string[] args ) {
  5.         LinkinPark b = new LinkinPark();
  6.         Console.WriteLine( "I " + b.InTheBeginning().Invoke( "shit too hard" ) );
  7.         return 0;                 //invoke is nessisary
  8.     }
  9. }
  10.  
  11. class LinkinPark {
  12.     public string InTheEnd( string a ) {
  13.         return a + ", in the end, it doesn't even matter\n";
  14.     }
  15.     public Func<string, string> InTheBeginning(  ) {
  16.         return (b) => b + " aaahhhhHHHHH\n"; //cannot be in brackets, compiler complains
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement