PropertyDataCollection.TryGetValue<> cannot handle an empty value type properties

Vote:
 
When trying to get the value of a value type Property that is not set with TryGetValue<> I get a NullReferenceException. This since the property value returns null when empty and TryGetValue tries to cast the value to the given type. PropertyNumber, PropertyFloatNumber, PropertyBoolean, PropertyCategory, PropertyDateTime all behaves like this. Can you confirm that this is not the expected behavior of value type properties?
#15787
Mar 25, 2008 19:07
Vote:
 
This is most definitely a bug. It has been entered as 7386: PropertyDataCollection.TryGetValue<> cannot handle an empty value type properties. Thank you for the report!
#16370
Mar 25, 2008 19:08
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.