Private card As Func(Of DateTime, String) =
Function(x As DateTime) If(x = New DateTime(DateTime.Now.Year, 12, 24), «Merry Christmas»,
If(x = New DateTime(DateTime.Now.Year, 12, 31), «Happy New Year»,
«No Card for today»))
Func<DateTime, string> card = (DateTime x) =>
x == new DateTime(DateTime.Now.Year, 12, 24) ? «Merry Christmas» :
x == new DateTime(DateTime.Now.Year, 12, 31) ? «Happy New Year» :
«No Card for today»;
Merry Christmas to everybody!
PepLluis,