foreach (var item in Model.Items)
{
var test = item.GetValue<string>("url");
}
I got en null exception:
exception of type 'System.NullReferenceException' occurred in Lecoati.LeBlender.Extension.dll but was not handled in user code
How I can test if URL setting is defined then do something? I try HasValue('url,) but the fonction is not avalaible.
Any suggestion?
Thanks
'Lecoati.LeBlender.Extension.Models.LeBlenderValue' does not contain a definition for 'IsNullOrEmpty'
Item = LeBlenderValue that do not implement any IsNull or HasValue, etc... I think I will have to put an "" like default value to be able to test if(item != "") of for the item to be null and not undefined....
How to test if value is null
When I do this:
I got en null exception: exception of type 'System.NullReferenceException' occurred in Lecoati.LeBlender.Extension.dll but was not handled in user code
How I can test if URL setting is defined then do something? I try HasValue('url,) but the fonction is not avalaible. Any suggestion? Thanks
Try this,
foreach (var item in Model.Items) { if(!item .IsNullOrEmpty(url)) { var test = item.GetValue
No, that do not work because:
'Lecoati.LeBlender.Extension.Models.LeBlenderValue' does not contain a definition for 'IsNullOrEmpty'
Item = LeBlenderValue that do not implement any IsNull or HasValue, etc... I think I will have to put an "" like default value to be able to test if(item != "") of for the item to be null and not undefined....
Hi Pierre
I haven't tested this, but maybe this?
or
/Bjarne
is working on a reply...