4 ms·
Actually... he misses a big use case (stolen from haskell)... Using extension methods (which accept null receivers) and "as" you can get pretty readable straigh
by scottdw2 15y ago
Actually... he misses a big use case (stolen from haskell)... Using extension methods (which accept null receivers) and "as" you can get pretty readable straight line code... something like:
name = (obj as Customer).LiftName() ?? "Guy Incognito"
Interestingly, built in support for this (w/o the need to write a "LiftName" extension method) almost made it into VB 2008, but it ended up getting cut.