StringNvlExpression
Table of Contents
What it is
StringNvlExpression is used specify how to treat a NULL value in a String property (or field or variable). If the String appears to be NULL, it will be assigned a default value or a specified value.
- See LINQ for details about LINQ and the AI-Framework.
- Go to the category for all LINQ expressions.
Code example
public ReadOnlyStringProperty StringNvlExample
{
get
{
return CalculatedStringProperty(() =>
Operation.EditItem.Name.Nvl());
}
}
Explanation of the example
The example above works as follows.
- Line 1 defines a ReadOnlyStringProperty with the name
StringNvlExample. - In Line 5 and 6 the content of this property is going to be calculated and assigned.
- In line 6, the String
Operation.EditItem.Numberis evaluated, by adding.Nvl. - If the String appears to be NULL, then
StringNvlExamplewill be assigned the value afterNvlbetween parentheses. When nothing is specified, the default value will be an empty string"".