c# - Select nonNullable values of nullable property from collection of objects with PLINQ -
why when use plinq in query such as
var notnullparametervalues = (from operation in operations.asparallel() operation.nullableparameter.hasvalue select operation.nullableparameter.value) .distinct().tolist();
resharper warn me 'possible system.invalidoperationexception'?
for simplicity operations ilist<operation>;
public class operation { public int? nullableparameter {get; set;} }
update: thank answers.
maybe because resharper not perfect?
i sure suggesting check if operation null.
Comments
Post a Comment