asp.net - List.Find throwing Nullable object must have a value error -


dim sipff systeminfopropertiesforform = listsysteminfopropertiesforform.find(function(f) f.showfieldpropertytypeid = cint(systeminfopropertyids.showmilestone)) 

systeminfopropertiesforform complex type items nullable.

cint(systeminfopropertyids.showmilestone) = 900

listsysteminfopropertiesforform has 10 items

any idea ?

fixed using below code

dim sipff systeminfopropertiesforform = listsysteminfopropertiesforform.find(function(f) f.showfieldpropertytypeid.hasvalue andalso f.showfieldpropertytypeid.value = cint(systeminfopropertyids.showmilestone)) 

Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -