Ran into an interesting error. When using the following code:
EntityField fld = (EntityField)Courses.Fields[colname];
if (fld != null) <<< compile time error here!!
{
.... do things
}
I get the following error on the marked line...
The call is ambiguous between the following methods or properties:
'SD.LLBLGen.Pro.ORMSupportClasses.EntityField.operator !=(SD.LLBLGen.Pro.ORMSupportClasses.EntityField, System.Collections.ArrayList)' and 'SD.LLBLGen.Pro.ORMSupportClasses.EntityField.operator !=(SD.LLBLGen.Pro.ORMSupportClasses.EntityField, SD.LLBLGen.Pro.ORMSupportClasses.Expression)'
There are situations where the name passed in will not have a matching data field in the Courses entity. Since, without the null EntityField check, I get an exception complaining that the variable 'fld' is null, I thought the null check would work.