Link to home
Start Free TrialLog in
Avatar of Peter Chan
Peter ChanFlag for Hong Kong

asked on

Correct the line

Hi,
How to correct 2nd line below
                                        p.csize.Equals(csize, StringComparison.OrdinalIgnoreCase) And
                                        p.nitemqty.Equals(nitemqty, vbDecimal.CompareTo)).FirstOrDefault

Open in new window

while the relevant field/column is with Decimal type?
Avatar of Phil Davidson
Phil Davidson
Flag of United States of America image

There are two closing parentheses "))" but only one open "(" one.
ASKER CERTIFIED SOLUTION
Avatar of chaau
chaau
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I agree with chaat. Also the only time you would use FirstOrDefault is when you have more then one item such as a Collection.
It looks like that was part of the bigger statement that tried to set a filter on the collection, thus the FirstOrDefault
If that was the  case it was not placed in the correct place seeming it was placed at the end of a comparison between two Decimals values.
There is an extra closing parentheses there for a reason, I guess