I am receiving an "Operator '==' cannot be applied to operands of type 'method group' and 'string'" error on the third line of this code and I do not know why.
where (PRIORITiesItem.Prioid == null || PRIORITiesItem.Prioid.Contains("1%"))
&& (SITEItem.Id == "TH" || SITEItem.Id == "NM")
--> && (sv.Glseg.TrimStart == "703" || sv.Glseg.TrimStart == "704" || sv.Glseg.TrimStart == "705")
&& (CREWItem.Crewid == null || !CREWItem.Crewid.Contains("2-%") && CREWItem.Crewid.Contains("MAINT")
|| (CREWItem.Crewid.Contains("ELECT") || CREWItem.Crewid.Contains("INST")
&& !WORKORDERTYPEItem.Id.Contains("Standing")))
At first I thought that maybe it didn't like "==" so I chnaged it with "=" but that wasn't the problem. besides, the line right above it uses "==" and it works just fine. Glseg is a field within a table, not a method so it must not like the string. Does anyone have any ideas where I am going wrong?
In C#, those methods have to be called with
()
: