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.

take jetbrains issue tracker


Comments

Popular posts from this blog

jQuery Mobile app not scrolling in Firefox -

c++ - How to add Crypto++ library to Qt project -

php array slice every 2th rule -