C# linq FirstOrDefault() -
i select 1 double value ienumerable, how can overload firstordefault() function, return null on default, instead of zero, iwant like:
double? x = ... .firstordefault();
i can catch exception, , write double? x = null, have 20 variables, , not way
why not do:
double? x = mydoubles.cast<double?>().firstordefault();
Comments
Post a Comment