I am setting up some fields in the mapper to Use Nullable Generic. This setting works ok if the field is a numeric type, but if the field is varchar, the code the mapper generates is causing the build to fail. Here is the code for the field:
The hilighted code is giving the error: Error 1 Type argument 'String' does not satisfy the 'Structure' constraint for type parameter 'T' ...
Anyone know why this is? Thanks!
Only structure data types support a generic nullable, and a string is not a structure data type. To determine what does and does not support a nullable generic, you can reference the object browse and look at the inheritance. Anything that inherits from a System.ValueType can be used with a nullable generic. Here is the rule of thumb, if Nothing or NULL can be assigned to it, it does not support a nullable generic.
When nullable generic is not supported, use Return Alternate on NULL option for the field and specify the exact text below that should be returned. For example, if you want to return an empty string, enter the following value: ""