Correct the line

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?
LVL 12
HuaMin ChenProblem resolverAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Phil DavidsonCommented:
There are two closing parentheses "))" but only one open "(" one.
for the Decimal object the Equals method takes only one argument. As a result the correct code should be:
p.csize.Equals(csize, StringComparison.OrdinalIgnoreCase) And

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Fernando SotoRetiredCommented:
I agree with chaat. Also the only time you would use FirstOrDefault is when you have more then one item such as a Collection.
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

It looks like that was part of the bigger statement that tried to set a filter on the collection, thus the FirstOrDefault
Fernando SotoRetiredCommented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.